From b7f7ac7f1aa89d2e6af50f1a4fb3387e76d4905e Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Mon, 28 Sep 2009 10:07:00 +0000 Subject: [PATCH 1/3] Changed the default install directory to /usr/local in Linux makefiles Fixed absolute symbolic links to relative ones in Linux makefiles git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1224 4e206d99-4929-0410-ac5d-dfc041789085 --- CSFML/src/SFML/Audio/Makefile | 2 +- CSFML/src/SFML/Graphics/Makefile | 2 +- CSFML/src/SFML/Makefile | 2 +- CSFML/src/SFML/Network/Makefile | 2 +- CSFML/src/SFML/System/Makefile | 2 +- CSFML/src/SFML/Window/Makefile | 2 +- src/SFML/Audio/Makefile | 2 +- src/SFML/Graphics/Makefile | 2 +- src/SFML/Makefile | 2 +- src/SFML/Network/Makefile | 2 +- src/SFML/System/Makefile | 2 +- src/SFML/Window/Makefile | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CSFML/src/SFML/Audio/Makefile b/CSFML/src/SFML/Audio/Makefile index 08bfbce9..5e06b6b7 100644 --- a/CSFML/src/SFML/Audio/Makefile +++ b/CSFML/src/SFML/Audio/Makefile @@ -20,4 +20,4 @@ mrproper: clean @rm -rf $(LIBNAME) install: - @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) + @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) diff --git a/CSFML/src/SFML/Graphics/Makefile b/CSFML/src/SFML/Graphics/Makefile index d5e1c83d..9e1f5969 100644 --- a/CSFML/src/SFML/Graphics/Makefile +++ b/CSFML/src/SFML/Graphics/Makefile @@ -20,4 +20,4 @@ mrproper: clean @rm -rf $(LIBNAME) install: - @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) + @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) diff --git a/CSFML/src/SFML/Makefile b/CSFML/src/SFML/Makefile index 553e181f..2f542131 100644 --- a/CSFML/src/SFML/Makefile +++ b/CSFML/src/SFML/Makefile @@ -7,7 +7,7 @@ export VERSION = 1.6 export CP = cp export LN = ln export LNFLAGS = -s -f -export DESTDIR = /usr +export DESTDIR = /usr/local export DESTLIBDIR = $(DESTDIR)/lib export DESTINCDIR = $(DESTDIR)/include diff --git a/CSFML/src/SFML/Network/Makefile b/CSFML/src/SFML/Network/Makefile index 924907e0..9b82f85a 100644 --- a/CSFML/src/SFML/Network/Makefile +++ b/CSFML/src/SFML/Network/Makefile @@ -20,4 +20,4 @@ mrproper: clean @rm -rf $(LIBNAME) install: - @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) + @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) diff --git a/CSFML/src/SFML/System/Makefile b/CSFML/src/SFML/System/Makefile index bdf1e4e5..0de6a153 100644 --- a/CSFML/src/SFML/System/Makefile +++ b/CSFML/src/SFML/System/Makefile @@ -20,4 +20,4 @@ mrproper: clean @rm -rf $(LIBNAME) install: - @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) + @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) diff --git a/CSFML/src/SFML/Window/Makefile b/CSFML/src/SFML/Window/Makefile index 3bd276a4..b6f7bcdb 100644 --- a/CSFML/src/SFML/Window/Makefile +++ b/CSFML/src/SFML/Window/Makefile @@ -20,4 +20,4 @@ mrproper: clean @rm -rf $(LIBNAME) install: - @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) + @($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)) diff --git a/src/SFML/Audio/Makefile b/src/SFML/Audio/Makefile index 109a00ad..0215e809 100644 --- a/src/SFML/Audio/Makefile +++ b/src/SFML/Audio/Makefile @@ -10,7 +10,7 @@ ifeq ($(STATIC), yes) else LIB = libsfml-audio.so LIBNAME = $(LIBPATH)/$(LIB).$(VERSION) - INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) + INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) endif all: $(LIB) diff --git a/src/SFML/Graphics/Makefile b/src/SFML/Graphics/Makefile index c9274356..4de224d6 100644 --- a/src/SFML/Graphics/Makefile +++ b/src/SFML/Graphics/Makefile @@ -18,7 +18,7 @@ ifeq ($(STATIC), yes) else LIB = libsfml-graphics.so LIBNAME = $(LIBPATH)/$(LIB).$(VERSION) - INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) + INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) endif all: $(LIB) diff --git a/src/SFML/Makefile b/src/SFML/Makefile index 02b70e46..efa9fdb9 100644 --- a/src/SFML/Makefile +++ b/src/SFML/Makefile @@ -27,7 +27,7 @@ export LN = ln export LNFLAGS = -s -f export AR = ar export ARFLAGS = rcs -export DESTDIR = /usr +export DESTDIR = /usr/local export DESTLIBDIR = $(DESTDIR)/lib export DESTINCDIR = $(DESTDIR)/include diff --git a/src/SFML/Network/Makefile b/src/SFML/Network/Makefile index d30da624..62fb6731 100644 --- a/src/SFML/Network/Makefile +++ b/src/SFML/Network/Makefile @@ -8,7 +8,7 @@ ifeq ($(STATIC), yes) else LIB = libsfml-network.so LIBNAME = $(LIBPATH)/$(LIB).$(VERSION) - INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) + INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) endif all: $(LIB) diff --git a/src/SFML/System/Makefile b/src/SFML/System/Makefile index 04514f5b..1cf6211e 100644 --- a/src/SFML/System/Makefile +++ b/src/SFML/System/Makefile @@ -8,7 +8,7 @@ ifeq ($(STATIC), yes) else LIB = libsfml-system.so LIBNAME = $(LIBPATH)/$(LIB).$(VERSION) - INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) + INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) endif all: $(LIB) diff --git a/src/SFML/Window/Makefile b/src/SFML/Window/Makefile index 956b34ba..0dd689c4 100644 --- a/src/SFML/Window/Makefile +++ b/src/SFML/Window/Makefile @@ -9,7 +9,7 @@ ifeq ($(STATIC), yes) else LIB = libsfml-window.so LIBNAME = $(LIBPATH)/$(LIB).$(VERSION) - INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) + INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB) endif all: $(LIB) From 58db9f25b12ead7fb389fe034d86e533f5d36698 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sat, 3 Oct 2009 18:36:19 +0000 Subject: [PATCH 2/3] Added detection of FreeBSD in CSFML's config.h git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1229 4e206d99-4929-0410-ac5d-dfc041789085 --- CSFML/include/SFML/Config.h | 5 +++++ CSFML/include/SFML/Window/WindowHandle.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CSFML/include/SFML/Config.h b/CSFML/include/SFML/Config.h index bd75fa92..8a18eb6c 100644 --- a/CSFML/include/SFML/Config.h +++ b/CSFML/include/SFML/Config.h @@ -44,6 +44,11 @@ // MacOS #define CSFML_SYSTEM_MACOS +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + + // FreeBSD + #define CSFML_SYSTEM_FREEBSD + #else // Unsupported system diff --git a/CSFML/include/SFML/Window/WindowHandle.h b/CSFML/include/SFML/Window/WindowHandle.h index 78d5750f..31d0eb7e 100644 --- a/CSFML/include/SFML/Window/WindowHandle.h +++ b/CSFML/include/SFML/Window/WindowHandle.h @@ -40,7 +40,7 @@ // Windows defines a void* handle (HWND) typedef void* sfWindowHandle; -#elif defined(CSFML_SYSTEM_LINUX) +#elif defined(CSFML_SYSTEM_LINUX) || defined(CSFML_SYSTEM_FREEBSD) // Unix - X11 defines an unsigned integer handle (Window) typedef unsigned long sfWindowHandle; From 49b97bb09ab90aaa41c6094c95d8181e2f7fd391 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Thu, 8 Oct 2009 07:08:34 +0000 Subject: [PATCH 3/3] Fixed "lib" directory not created before building libraries, in SFML and CSFML Linux makefiles git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1231 4e206d99-4929-0410-ac5d-dfc041789085 --- CSFML/src/SFML/Makefile | 5 +++++ samples/Makefile | 12 ++++++++++++ src/SFML/Makefile | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/CSFML/src/SFML/Makefile b/CSFML/src/SFML/Makefile index 2f542131..e7b4b988 100644 --- a/CSFML/src/SFML/Makefile +++ b/CSFML/src/SFML/Makefile @@ -14,18 +14,23 @@ export DESTINCDIR = $(DESTDIR)/include 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 diff --git a/samples/Makefile b/samples/Makefile index 7d8fb8e2..938152a5 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -13,39 +13,51 @@ export EXECPATH = ../bin all: ftp-sample opengl-sample pong-sample post-fx-sample qt-sample sockets-sample sound-sample sound_capture-sample voip-sample window-sample wxwidgets-sample X11-sample ftp-sample: + @(mkdir -p bin) @(cd ./ftp && $(MAKE)) opengl-sample: + @(mkdir -p bin) @(cd ./opengl && $(MAKE)) pong-sample: + @(mkdir -p bin) @(cd ./pong && $(MAKE)) post-fx-sample: + @(mkdir -p bin) @(cd ./post-fx && $(MAKE)) qt-sample: + @(mkdir -p bin) @(cd ./qt && $(MAKE)) sockets-sample: + @(mkdir -p bin) @(cd ./sockets && $(MAKE)) sound-sample: + @(mkdir -p bin) @(cd ./sound && $(MAKE)) sound_capture-sample: + @(mkdir -p bin) @(cd ./sound_capture && $(MAKE)) voip-sample: + @(mkdir -p bin) @(cd ./voip && $(MAKE)) window-sample: + @(mkdir -p bin) @(cd ./window && $(MAKE)) wxwidgets-sample: + @(mkdir -p bin) @(cd ./wxwidgets && $(MAKE)) X11-sample: + @(mkdir -p bin) @(cd ./X11 && $(MAKE)) .PHONY: clean mrproper diff --git a/src/SFML/Makefile b/src/SFML/Makefile index efa9fdb9..d8f633e1 100644 --- a/src/SFML/Makefile +++ b/src/SFML/Makefile @@ -34,18 +34,23 @@ export DESTINCDIR = $(DESTDIR)/include all: sfml-system sfml-window sfml-network sfml-graphics sfml-audio sfml-system: + @(mkdir -p ../../lib) @(cd ./System && $(MAKE)) sfml-window: + @(mkdir -p ../../lib) @(cd ./Window && $(MAKE)) sfml-network: + @(mkdir -p ../../lib) @(cd ./Network && $(MAKE)) sfml-graphics: + @(mkdir -p ../../lib) @(cd ./Graphics && $(MAKE)) sfml-audio: + @(mkdir -p ../../lib) @(cd ./Audio && $(MAKE)) .PHONY: clean mrproper