summaryrefslogtreecommitdiff
blob: 33a6f91bb6b63186ca88aac9a8c1c5912b81150c (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
--- SFML-1.6.orig/src/SFML/Audio/Makefile
+++ SFML-1.6/src/SFML/Audio/Makefile
@@ -10,7 +10,7 @@
 else
     LIB     = libsfml-audio.so
     LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
-    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
+    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
 endif
 
 all: $(LIB)
@@ -36,4 +36,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
--- SFML-1.6.orig/src/SFML/Graphics/Makefile
+++ SFML-1.6/src/SFML/Graphics/Makefile
@@ -18,7 +18,7 @@
 else
     LIB     = libsfml-graphics.so
     LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
-    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
+    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
 endif
 
 all: $(LIB)
@@ -44,4 +44,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
--- SFML-1.6.orig/src/SFML/Makefile
+++ SFML-1.6/src/SFML/Makefile
@@ -28,8 +28,11 @@
 export AR         = ar
 export ARFLAGS    = rcs
-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: sfml-system sfml-window sfml-network sfml-graphics sfml-audio
 
@@ -62,6 +66,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/src/SFML/Network/Makefile
+++ SFML-1.6/src/SFML/Network/Makefile
@@ -8,7 +8,7 @@
 else
     LIB     = libsfml-network.so
     LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
-    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
+    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
 endif
 
 all: $(LIB)
@@ -31,4 +31,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
--- SFML-1.6.orig/src/SFML/System/Makefile
+++ SFML-1.6/src/SFML/System/Makefile
@@ -8,7 +8,7 @@
 else
     LIB     = libsfml-system.so
     LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
-    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
+    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
 endif
 
 all: $(LIB)
@@ -31,4 +31,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))
--- SFML-1.6.orig/src/SFML/Window/Makefile
+++ SFML-1.6/src/SFML/Window/Makefile
@@ -9,7 +9,7 @@
 else
     LIB     = libsfml-window.so
     LIBNAME = $(LIBPATH)/$(LIB).$(VERSION)
-    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
+    INSTALL = && $(LN) $(LNFLAGS) $(LIB).$(VERSION) $(DESTDIR)/$(libdir)/$(LIB)
 endif
 
 all: $(LIB)
@@ -32,4 +32,4 @@
 	@rm -rf $(LIBNAME)
 
 install:
-	@($(CP) $(LIBNAME) $(DESTLIBDIR) $(INSTALL))
+	@($(CP) $(LIBNAME) $(DESTDIR)/$(libdir) $(INSTALL))