summaryrefslogtreecommitdiff
blob: cdf0c46215aea328576aa6feeafd5e3008b756bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- SFML-1.6.orig/CSFML/src/SFML/Audio/Makefile
+++ SFML-1.6/CSFML/src/SFML/Audio/Makefile
@@ -20,4 +20,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
--- SFML-1.6.orig/CSFML/src/SFML/Graphics/Makefile
+++ SFML-1.6/CSFML/src/SFML/Graphics/Makefile
@@ -20,4 +20,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
--- SFML-1.6.orig/CSFML/src/SFML/Makefile
+++ SFML-1.6/CSFML/src/SFML/Makefile
@@ -1,15 +1,18 @@
 export CC         = gcc
 export CPP        = g++
-export CFLAGS     = -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS -O2
-export LDFLAGS    = -shared
+export CFLAGS     += -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS
+export LDFLAGS    += -shared
 export LIBPATH    = ../../../lib
 export VERSION    = 1.6
 export CP         = cp
 export LN         = ln
 export LNFLAGS    = -s -f
-export DESTDIR    = /usr/local
-export DESTLIBDIR = $(DESTDIR)/lib
-export DESTINCDIR = $(DESTDIR)/include
+export DESTDIR    =
+ifeq ($(origin prefix), undefined)
+   export prefix = /usr/local
+endif
+export libdir     = $(prefix)/lib
+export includedir = $(prefix)/include
 
 all: csfml-system csfml-window csfml-network csfml-graphics csfml-audio
 
@@ -42,6 +45,6 @@
 	@(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))
+	@(mkdir -p $(DESTDIR)/$(libdir))
+	@(mkdir -p $(DESTDIR)/$(includedir))
+	@(cd ./System && $(MAKE) $@	&& cd ../Window && $(MAKE) $@ && cd ../Network && $(MAKE) $@ && cd ../Graphics && $(MAKE) $@ && cd ../Audio && $(MAKE) $@ && $(CP) -r ../../../include/SFML/ $(DESTDIR)/$(includedir))
--- SFML-1.6.orig/CSFML/src/SFML/Network/Makefile
+++ SFML-1.6/CSFML/src/SFML/Network/Makefile
@@ -20,4 +20,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
--- SFML-1.6.orig/CSFML/src/SFML/System/Makefile
+++ SFML-1.6/CSFML/src/SFML/System/Makefile
@@ -20,4 +20,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))
--- SFML-1.6.orig/CSFML/src/SFML/Window/Makefile
+++ SFML-1.6/CSFML/src/SFML/Window/Makefile
@@ -20,4 +20,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB))