Moved CSFML Linux makefiles outside the source tree

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1498 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2010-04-07 10:34:35 +00:00
parent af22a15df3
commit c0b84d3469
13 changed files with 90 additions and 104 deletions

View File

@ -1,14 +1,6 @@
all: csfml all: csfml
csfml: csfml install clean mrproper:
@(cd ./src/SFML && $(MAKE)) cd ./build/make && $(MAKE) $@
install:
@(cd ./src/SFML && $(MAKE) $@)
clean:
@(cd ./src/SFML && $(MAKE) $@)
mrproper:
@(cd ./src/SFML && $(MAKE) $@)

46
CSFML/build/make/Makefile Normal file
View File

@ -0,0 +1,46 @@
export SRCROOT = ../../src/SFML
export DESTDIR = /usr/local
export DESTLIBDIR = $(DESTDIR)/lib
export DESTINCDIR = $(DESTDIR)/include
export DESTDBGDIR = $(DESTLIBDIR)/debug/$(DESTLIBDIR)
export CC = gcc
export CPP = g++
export CFLAGS = -W -Wall -pedantic -Wno-unused -DCSFML_EXPORTS -g -O2 -DNDEBUG -I../../include -I../../src -fPIC
export CFLAGSEXT = -I../../include -I../../src -g -O2 -DNDEBUG -fPIC
export LDFLAGS = -shared
export LIBPATH = ../../lib
export VERSION = 2.0
export CP = cp
export LN = ln
export LNFLAGS = -s -f
export LIBS = system window graphics audio network
all: csfml
csfml: $(LIBS)
$(LIBS):
mkdir -p $(LIBPATH)
$(MAKE) -f Makefile.$@
install:
mkdir -p $(DESTLIBDIR)
mkdir -p $(DESTINCDIR)
mkdir -p $(DESTDBGDIR)
$(CP) -r ../../include/SFML/ $(DESTINCDIR)/
find $(DESTINCDIR)/SFML -name .svn -type d -print0 | xargs -0 /bin/rm -rf
$(MAKE) $@ -f Makefile.system
$(MAKE) $@ -f Makefile.window
$(MAKE) $@ -f Makefile.graphics
$(MAKE) $@ -f Makefile.audio
$(MAKE) $@ -f Makefile.network
clean mrproper:
$(MAKE) $@ -f Makefile.system
$(MAKE) $@ -f Makefile.window
$(MAKE) $@ -f Makefile.graphics
$(MAKE) $@ -f Makefile.audio
$(MAKE) $@ -f Makefile.network
.PHONY: clean mrproper

View File

@ -1,9 +1,9 @@
LIB = libcsfml-audio.so SRC = $(wildcard $(SRCROOT)/Audio/*.cpp)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libcsfml-audio.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB) LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB) all: $(LIB)
@ -16,12 +16,12 @@ $(OBJ): %.o: %.cpp
.PHONY: clean mrproper .PHONY: clean mrproper
clean: clean:
@rm -rf $(OBJ) rm -rf $(OBJ)
mrproper: clean mrproper: clean
@rm -rf $(FULLLIBNAME) rm -rf $(FULLLIBNAME)
install: install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME) objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME) objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK) $(LINK)

View File

@ -1,6 +1,6 @@
LIB = libcsfml-graphics.so SRC = $(wildcard $(SRCROOT)/Graphics/*.cpp)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libcsfml-graphics.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB) LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
@ -8,7 +8,7 @@ LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB) all: $(LIB)
libcsfml-graphics.so: $(OBJ) libcsfml-graphics.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsfml-graphics -lsfml-window -lsfml-system $(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsfml-graphics -lsfml-window -lsfml-system
$(OBJ): %.o: %.cpp $(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS) $(CPP) -o $@ -c $< $(CFLAGS)
@ -16,12 +16,12 @@ $(OBJ): %.o: %.cpp
.PHONY: clean mrproper .PHONY: clean mrproper
clean: clean:
@rm -rf $(OBJ) rm -rf $(OBJ)
mrproper: clean mrproper: clean
@rm -rf $(FULLLIBNAME) rm -rf $(FULLLIBNAME)
install: install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME) objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME) objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK) $(LINK)

View File

@ -1,9 +1,9 @@
LIB = libcsfml-network.so SRC = $(wildcard $(SRCROOT)/Network/*.cpp)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libcsfml-network.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB) LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB) all: $(LIB)
@ -16,12 +16,12 @@ $(OBJ): %.o: %.cpp
.PHONY: clean mrproper .PHONY: clean mrproper
clean: clean:
@rm -rf $(OBJ) rm -rf $(OBJ)
mrproper: clean mrproper: clean
@rm -rf $(FULLLIBNAME) rm -rf $(FULLLIBNAME)
install: install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME) objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME) objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK) $(LINK)

View File

@ -1,9 +1,9 @@
LIB = libcsfml-system.so SRC = $(wildcard $(SRCROOT)/System/*.cpp)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libcsfml-system.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB) LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB) all: $(LIB)
@ -16,12 +16,12 @@ $(OBJ): %.o: %.cpp
.PHONY: clean mrproper .PHONY: clean mrproper
clean: clean:
@rm -rf $(OBJ) rm -rf $(OBJ)
mrproper: clean mrproper: clean
@rm -rf $(FULLLIBNAME) rm -rf $(FULLLIBNAME)
install: install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME) objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME) objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK) $(LINK)

View File

@ -1,9 +1,9 @@
LIB = libcsfml-window.so SRC = $(wildcard $(SRCROOT)/Window/*.cpp)
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libcsfml-window.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB) LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB) all: $(LIB)
@ -12,16 +12,16 @@ libcsfml-window.so: $(OBJ)
$(OBJ): %.o: %.cpp $(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS) $(CPP) -o $@ -c $< $(CFLAGS)
.PHONY: clean mrproper .PHONY: clean mrproper
clean: clean:
@rm -rf $(OBJ) rm -rf $(OBJ)
mrproper: clean mrproper: clean
@rm -rf $(FULLLIBNAME) rm -rf $(FULLLIBNAME)
install: install:
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME) objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME) objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK) $(LINK)

View File

@ -142,7 +142,7 @@ unsigned int sfRenderWindow_GetHeight(const sfRenderWindow* renderWindow)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow) sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow)
{ {
sfContextSettings settings = {0, 0, 0}; sfContextSettings settings = {0, 0, 0, 2, 0};
CSFML_CHECK_RETURN(renderWindow, settings); CSFML_CHECK_RETURN(renderWindow, settings);
const sf::ContextSettings& params = renderWindow->This.GetSettings(); const sf::ContextSettings& params = renderWindow->This.GetSettings();

View File

@ -1,48 +0,0 @@
export CC = gcc
export CPP = g++
export CFLAGS = -W -Wall -pedantic -Wno-unused -I../.. -I../../../include -g -O2 -DNDEBUG -fPIC -DCSFML_EXPORTS
export LDFLAGS = -shared
export LIBPATH = ../../../lib
export VERSION = 2.0
export CP = cp
export LN = ln
export LNFLAGS = -s -f
export DESTDIR = /usr/local
export DESTLIBDIR = $(DESTDIR)/lib
export DESTINCDIR = $(DESTDIR)/include
export DESTDBGDIR = $(DESTLIBDIR)/debug/$(DESTLIBDIR)
all: csfml-system csfml-window csfml-network csfml-graphics csfml-audio
csfml-system:
@(mkdir -p ../../lib)
@(cd ./System && $(MAKE))
csfml-window:
@(mkdir -p ../../lib)
@(cd ./Window && $(MAKE))
csfml-network:
@(mkdir -p ../../lib)
@(cd ./Network && $(MAKE))
csfml-graphics:
@(mkdir -p ../../lib)
@(cd ./Graphics && $(MAKE))
csfml-audio:
@(mkdir -p ../../lib)
@(cd ./Audio && $(MAKE))
.PHONY: clean mrproper
clean:
@(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@)
mrproper: clean
@(cd ./System && $(MAKE) $@ && cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@)
install:
@(mkdir -p $(DESTLIBDIR))
@(mkdir -p $(DESTINCDIR))
@(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)

View File

@ -1,6 +1,5 @@
SRC = $(wildcard $(SRCROOT)/Audio/*.cpp) SRC = $(wildcard $(SRCROOT)/Audio/*.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libsfml-audio.so LIB = libsfml-audio.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)

View File

@ -1,6 +1,5 @@
SRC = $(wildcard $(SRCROOT)/Network/*.cpp $(SRCROOT)/Network/Unix/*.cpp) SRC = $(wildcard $(SRCROOT)/Network/*.cpp $(SRCROOT)/Network/Unix/*.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libsfml-network.so LIB = libsfml-network.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)

View File

@ -1,6 +1,5 @@
SRC = $(wildcard $(SRCROOT)/System/*.cpp $(SRCROOT)/System/Unix/*.cpp) SRC = $(wildcard $(SRCROOT)/System/*.cpp $(SRCROOT)/System/Unix/*.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libsfml-system.so LIB = libsfml-system.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)

View File

@ -1,6 +1,5 @@
SRC = $(wildcard $(SRCROOT)/Window/*.cpp $(SRCROOT)/Window/Linux/*.cpp) SRC = $(wildcard $(SRCROOT)/Window/*.cpp $(SRCROOT)/Window/Linux/*.cpp)
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
LIB = libsfml-window.so LIB = libsfml-window.so
LIBNAME = $(LIB).$(VERSION) LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME) FULLLIBNAME = $(LIBPATH)/$(LIBNAME)