Applied to CSFML makefiles the same modifications as the SFML ones

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1301 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
laurentgom 2009-12-03 09:19:25 +00:00
parent 08f819e49e
commit 148626ed5b
7 changed files with 61 additions and 38 deletions

View File

@ -1,12 +1,14 @@
LIB = libcsfml-audio.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
LIB = libcsfml-audio.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB)
libcsfml-audio.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lsfml-audio
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsfml-audio
$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS)
@ -17,7 +19,9 @@ clean:
@rm -rf $(OBJ)
mrproper: clean
@rm -rf $(LIBNAME)
@rm -rf $(FULLLIBNAME)
install:
@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK)

View File

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

View File

@ -1,6 +1,6 @@
export CC = gcc
export CPP = g++
export CFLAGS = -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS -O2
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
@ -10,6 +10,7 @@ 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
@ -44,4 +45,4 @@ mrproper: clean
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))
@(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,12 +1,14 @@
LIB = libcsfml-network.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
LIB = libcsfml-network.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB)
libcsfml-network.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lsfml-network
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsfml-network
$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS)
@ -17,7 +19,9 @@ clean:
@rm -rf $(OBJ)
mrproper: clean
@rm -rf $(LIBNAME)
@rm -rf $(FULLLIBNAME)
install:
@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK)

View File

@ -1,12 +1,14 @@
LIB = libcsfml-system.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
LIB = libcsfml-system.so
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LIBNAME = $(LIB).$(VERSION)
FULLLIBNAME = $(LIBPATH)/$(LIBNAME)
LINK = $(LN) $(LNFLAGS) $(LIBNAME) $(DESTLIBDIR)/$(LIB)
all: $(LIB)
libcsfml-system.so: $(OBJ)
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lsfml-system
$(CPP) $(LDFLAGS) -Wl,-soname,$(LIBNAME) -o $(FULLLIBNAME) $(OBJ) -lsfml-system
$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS)
@ -17,7 +19,9 @@ clean:
@rm -rf $(OBJ)
mrproper: clean
@rm -rf $(LIBNAME)
@rm -rf $(FULLLIBNAME)
install:
@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
objcopy --only-keep-debug $(FULLLIBNAME) $(DESTDBGDIR)/$(LIBNAME)
objcopy --strip-unneeded $(FULLLIBNAME) $(DESTLIBDIR)/$(LIBNAME)
$(LINK)

View File

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

View File

@ -133,13 +133,15 @@ unsigned int sfWindow_GetHeight(const sfWindow* window)
////////////////////////////////////////////////////////////
sfContextSettings sfWindow_GetSettings(const sfWindow* window)
{
sfContextSettings settings = {0, 0, 0};
sfContextSettings settings = {0, 0, 0, 0, 0};
CSFML_CHECK_RETURN(window, settings);
const sf::ContextSettings& params = window->This.GetSettings();
settings.DepthBits = params.DepthBits;
settings.StencilBits = params.StencilBits;
settings.AntialiasingLevel = params.AntialiasingLevel;
settings.MajorVersion = params.MajorVersion;
settings.MinorVersion = params.MinorVersion;
return settings;
}