mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 12:51:05 +08:00
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:
parent
af22a15df3
commit
c0b84d3469
@ -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
46
CSFML/build/make/Makefile
Normal 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
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
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)
|
||||||
@ -16,10 +16,10 @@ $(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)
|
@ -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)
|
||||||
@ -16,10 +16,10 @@ $(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)
|
@ -1,6 +1,6 @@
|
|||||||
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)
|
||||||
@ -16,10 +16,10 @@ $(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)
|
@ -1,6 +1,6 @@
|
|||||||
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)
|
||||||
@ -16,10 +16,10 @@ $(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)
|
@ -1,6 +1,6 @@
|
|||||||
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)
|
||||||
@ -16,10 +16,10 @@ $(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)
|
@ -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();
|
||||||
|
@ -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)
|
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user