diff --git a/CSFML/src/SFML/Audio/Makefile b/CSFML/src/SFML/Audio/Makefile index 5e06b6b7..9b121e57 100644 --- a/CSFML/src/SFML/Audio/Makefile +++ b/CSFML/src/SFML/Audio/Makefile @@ -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) diff --git a/CSFML/src/SFML/Graphics/Makefile b/CSFML/src/SFML/Graphics/Makefile index 9e1f5969..cd9e6b66 100644 --- a/CSFML/src/SFML/Graphics/Makefile +++ b/CSFML/src/SFML/Graphics/Makefile @@ -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) diff --git a/CSFML/src/SFML/Makefile b/CSFML/src/SFML/Makefile index 103eabb4..209c217e 100644 --- a/CSFML/src/SFML/Makefile +++ b/CSFML/src/SFML/Makefile @@ -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) diff --git a/CSFML/src/SFML/Network/Makefile b/CSFML/src/SFML/Network/Makefile index 9b82f85a..c45a34fa 100644 --- a/CSFML/src/SFML/Network/Makefile +++ b/CSFML/src/SFML/Network/Makefile @@ -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) diff --git a/CSFML/src/SFML/System/Makefile b/CSFML/src/SFML/System/Makefile index 0de6a153..2753ed55 100644 --- a/CSFML/src/SFML/System/Makefile +++ b/CSFML/src/SFML/System/Makefile @@ -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) diff --git a/CSFML/src/SFML/Window/Makefile b/CSFML/src/SFML/Window/Makefile index b6f7bcdb..9317de69 100644 --- a/CSFML/src/SFML/Window/Makefile +++ b/CSFML/src/SFML/Window/Makefile @@ -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) diff --git a/CSFML/src/SFML/Window/Window.cpp b/CSFML/src/SFML/Window/Window.cpp index ac29a53b..7f22871b 100644 --- a/CSFML/src/SFML/Window/Window.cpp +++ b/CSFML/src/SFML/Window/Window.cpp @@ -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; }