mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 15:55:13 +08:00
Removed STATIC and DEBUGBUILD options from makefiles, debug symbols are now generated by default and installed to a separate folder
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1279 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
548991d665
commit
877df21756
@ -1,12 +1,5 @@
|
|||||||
export DEBUGBUILD = no
|
|
||||||
ifeq ($(DEBUGBUILD), yes)
|
|
||||||
DEBUGFLAGS = -g -DDEBUG
|
|
||||||
else
|
|
||||||
DEBUGFLAGS = -O2 -DNDEBUG
|
|
||||||
endif
|
|
||||||
|
|
||||||
export CC = g++
|
export CC = g++
|
||||||
export CFLAGS = -W -Wall -ansi -I../../include $(DEBUGFLAGS)
|
export CFLAGS = -W -Wall -ansi -g -O2 -DNDEBUG -I../../include
|
||||||
export LDFLAGS =
|
export LDFLAGS =
|
||||||
export EXECPATH = ../bin
|
export EXECPATH = ../bin
|
||||||
|
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
SRC = $(wildcard *.cpp)
|
SRC = $(wildcard *.cpp)
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
|
|
||||||
ifeq ($(STATIC), yes)
|
LIB = libsfml-audio.so
|
||||||
LIB = libsfml-audio-s.a
|
LIBNAME = $(LIB).$(VERSION)
|
||||||
LIBNAME = $(LIBPATH)/$(LIB)
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||||||
INSTALL =
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||||||
else
|
|
||||||
LIB = libsfml-audio.so
|
|
||||||
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
|
|
||||||
INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(LIB)
|
all: $(LIB)
|
||||||
|
|
||||||
libsfml-audio-s.a: $(OBJ)
|
libsfml-audio.so: $(OBJ)
|
||||||
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ)
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsndfile -lopenal
|
||||||
|
|
||||||
libsfml-audio.so: $(OBJ) $(OBJVORBIS)
|
|
||||||
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lsndfile -lopenal
|
|
||||||
|
|
||||||
$(OBJ): %.o: %.cpp
|
$(OBJ): %.o: %.cpp
|
||||||
$(CPP) -o $@ -c $< $(CFLAGS)
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||||||
@ -28,7 +20,9 @@ clean:
|
|||||||
@rm -rf $(OBJ)
|
@rm -rf $(OBJ)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
@rm -rf $(LIBNAME)
|
@rm -rf $(FULLLIBNAME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
||||||
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
||||||
|
$(LINK)
|
||||||
|
@ -11,37 +11,34 @@ OBJPNG = $(SRCPNG:.c=.o)
|
|||||||
OBJSOIL = $(SRCSOIL:.c=.o)
|
OBJSOIL = $(SRCSOIL:.c=.o)
|
||||||
OBJZLIB = $(SRCZLIB:.c=.o)
|
OBJZLIB = $(SRCZLIB:.c=.o)
|
||||||
|
|
||||||
ifeq ($(STATIC), yes)
|
LIB = libsfml-graphics.so
|
||||||
LIB = libsfml-graphics-s.a
|
LIBNAME = $(LIB).$(VERSION)
|
||||||
LIBNAME = $(LIBPATH)/$(LIB)
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||||||
INSTALL =
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||||||
else
|
|
||||||
LIB = libsfml-graphics.so
|
|
||||||
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
|
|
||||||
INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(LIB)
|
all: $(LIB)
|
||||||
|
|
||||||
libsfml-graphics-s.a: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
|
||||||
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
|
||||||
|
|
||||||
libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
||||||
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
|
||||||
|
|
||||||
$(OBJ): %.o: %.cpp
|
$(OBJ): %.o: %.cpp
|
||||||
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
|
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
|
||||||
|
|
||||||
$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB): %.o: %.c
|
$(OBJSOIL): %.o: %.c
|
||||||
$(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
|
$(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
|
||||||
|
|
||||||
|
$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJZLIB): %.o: %.c
|
||||||
|
$(CC) -o $@ -c $< $(CFLAGSEXT)
|
||||||
|
|
||||||
.PHONY: clean mrproper
|
.PHONY: clean mrproper
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
@rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
@rm -rf $(LIBNAME)
|
@rm -rf $(FULLLIBNAME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
||||||
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
||||||
|
$(LINK)
|
||||||
|
@ -1,35 +1,17 @@
|
|||||||
export DEBUGBUILD = no
|
|
||||||
export STATIC = no
|
|
||||||
|
|
||||||
ifeq ($(DEBUGBUILD), yes)
|
|
||||||
DEBUGFLAGS = -g -DDEBUG
|
|
||||||
else
|
|
||||||
DEBUGFLAGS = -O2 -DNDEBUG
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(STATIC), no)
|
|
||||||
BUILDFLAGS = -fPIC
|
|
||||||
LINKFLAGS = -shared
|
|
||||||
else
|
|
||||||
BUILDFLAGS =
|
|
||||||
LINKFLAGS =
|
|
||||||
endif
|
|
||||||
|
|
||||||
export CC = gcc
|
export CC = gcc
|
||||||
export CPP = g++
|
export CPP = g++
|
||||||
export CFLAGS = -W -Wall -pedantic -I../../../include -I../../ $(DEBUGFLAGS) $(BUILDFLAGS)
|
export CFLAGS = -W -Wall -pedantic -g -O2 -DNDEBUG -I../../../include -I../../ -fPIC
|
||||||
export CFLAGSEXT = -I../../../include -I../.. $(DEBUGFLAGS) $(BUILDFLAGS)
|
export CFLAGSEXT = -I../../../include -I../.. -g -O2 -DNDEBUG -fPIC
|
||||||
export LDFLAGS = $(LINKFLAGS)
|
export LDFLAGS = -shared
|
||||||
export LIBPATH = ../../../lib
|
export LIBPATH = ../../../lib
|
||||||
export VERSION = 2.0
|
export VERSION = 2.0
|
||||||
export CP = cp
|
export CP = cp
|
||||||
export LN = ln
|
export LN = ln
|
||||||
export LNFLAGS = -s -f
|
export LNFLAGS = -s -f
|
||||||
export AR = ar
|
|
||||||
export ARFLAGS = rcs
|
|
||||||
export DESTDIR = /usr/local
|
export DESTDIR = /usr/local
|
||||||
export DESTLIBDIR = $(DESTDIR)/lib
|
export DESTLIBDIR = $(DESTDIR)/lib
|
||||||
export DESTINCDIR = $(DESTDIR)/include
|
export DESTINCDIR = $(DESTDIR)/include
|
||||||
|
export DESTDBGDIR = $(DESTLIBDIR)/debug/$(DESTLIBDIR)
|
||||||
|
|
||||||
all: sfml-system sfml-window sfml-network sfml-graphics sfml-audio
|
all: sfml-system sfml-window sfml-network sfml-graphics sfml-audio
|
||||||
|
|
||||||
@ -64,4 +46,5 @@ mrproper: clean
|
|||||||
install:
|
install:
|
||||||
@(mkdir -p $(DESTLIBDIR))
|
@(mkdir -p $(DESTLIBDIR))
|
||||||
@(mkdir -p $(DESTINCDIR))
|
@(mkdir -p $(DESTINCDIR))
|
||||||
@(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTINCDIR)/)
|
@(mkdir -p $(DESTDBGDIR))
|
||||||
|
@(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTINCDIR)/ && find $(DESTINCDIR)/SFML -name .svn -type d -print0 | xargs -0 /bin/rm -rf)
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
SRC = $(wildcard *.cpp ./Unix/*.cpp)
|
SRC = $(wildcard *.cpp ./Unix/*.cpp)
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
|
|
||||||
ifeq ($(STATIC), yes)
|
LIB = libsfml-network.so
|
||||||
LIB = libsfml-network-s.a
|
LIBNAME = $(LIB).$(VERSION)
|
||||||
LIBNAME = $(LIBPATH)/$(LIB)
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||||||
INSTALL =
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||||||
else
|
|
||||||
LIB = libsfml-network.so
|
|
||||||
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
|
|
||||||
INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(LIB)
|
all: $(LIB)
|
||||||
|
|
||||||
libsfml-network-s.a: $(OBJ)
|
|
||||||
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ)
|
|
||||||
|
|
||||||
libsfml-network.so: $(OBJ)
|
libsfml-network.so: $(OBJ)
|
||||||
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ)
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ)
|
||||||
|
|
||||||
$(OBJ): %.o: %.cpp
|
$(OBJ): %.o: %.cpp
|
||||||
$(CPP) -o $@ -c $< $(CFLAGS)
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||||||
@ -28,7 +20,9 @@ clean:
|
|||||||
@rm -rf $(OBJ)
|
@rm -rf $(OBJ)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
@rm -rf $(LIBNAME)
|
@rm -rf $(FULLLIBNAME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
||||||
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
||||||
|
$(LINK)
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
SRC = $(wildcard *.cpp ./Unix/*.cpp)
|
SRC = $(wildcard *.cpp ./Unix/*.cpp)
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
|
|
||||||
ifeq ($(STATIC), yes)
|
LIB = libsfml-system.so
|
||||||
LIB = libsfml-system-s.a
|
LIBNAME = $(LIB).$(VERSION)
|
||||||
LIBNAME = $(LIBPATH)/$(LIB)
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||||||
INSTALL =
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||||||
else
|
|
||||||
LIB = libsfml-system.so
|
|
||||||
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
|
|
||||||
INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(LIB)
|
all: $(LIB)
|
||||||
|
|
||||||
libsfml-system-s.a: $(OBJ)
|
|
||||||
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ)
|
|
||||||
|
|
||||||
libsfml-system.so: $(OBJ)
|
libsfml-system.so: $(OBJ)
|
||||||
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lpthread
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lpthread
|
||||||
|
|
||||||
$(OBJ): %.o: %.cpp
|
$(OBJ): %.o: %.cpp
|
||||||
$(CPP) -o $@ -c $< $(CFLAGS)
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||||||
@ -28,7 +20,9 @@ clean:
|
|||||||
@rm -rf $(OBJ)
|
@rm -rf $(OBJ)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
@rm -rf $(LIBNAME)
|
@rm -rf $(FULLLIBNAME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
||||||
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
||||||
|
$(LINK)
|
||||||
|
@ -1,24 +1,15 @@
|
|||||||
SRC = $(wildcard *.cpp ./Linux/*.cpp)
|
SRC = $(wildcard *.cpp ./Linux/*.cpp)
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
OBJGLEW = $(SRCGLEW:.c=.o)
|
|
||||||
|
|
||||||
ifeq ($(STATIC), yes)
|
LIB = libsfml-window.so
|
||||||
LIB = libsfml-window-s.a
|
LIBNAME = $(LIB).$(VERSION)
|
||||||
LIBNAME = $(LIBPATH)/$(LIB)
|
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
|
||||||
INSTALL =
|
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
|
||||||
else
|
|
||||||
LIB = libsfml-window.so
|
|
||||||
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
|
|
||||||
INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(LIB)
|
all: $(LIB)
|
||||||
|
|
||||||
libsfml-window-s.a: $(OBJ)
|
|
||||||
$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ)
|
|
||||||
|
|
||||||
libsfml-window.so: $(OBJ)
|
libsfml-window.so: $(OBJ)
|
||||||
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) -lX11 -lXrandr -lGL
|
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lX11 -lXrandr -lGL
|
||||||
|
|
||||||
$(OBJ): %.o: %.cpp
|
$(OBJ): %.o: %.cpp
|
||||||
$(CPP) -o $@ -c $< $(CFLAGS)
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||||||
@ -29,7 +20,9 @@ clean:
|
|||||||
@rm -rf $(OBJ)
|
@rm -rf $(OBJ)
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
@rm -rf $(LIBNAME)
|
@rm -rf $(FULLLIBNAME)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
|
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
|
||||||
|
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
|
||||||
|
$(LINK)
|
||||||
|
Loading…
Reference in New Issue
Block a user