summaryrefslogtreecommitdiff
path: root/emulators/mupen64-base/files/patch-Makefile
blob: 461d7a8daf3b65183ae5e72e4009e74e53654ecc (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
--- Makefile.orig	2005-08-26 14:52:13.000000000 -0500
+++ Makefile	2007-10-08 18:29:37.000000000 -0500
@@ -1,14 +1,9 @@
 #Makefile MUPEN64 for Linux
 
-CC		=gcc
-CXX		=g++
+CC		?=gcc
+CXX		?=g++
 
-#CFLAGS		=-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG
-CFLAGS		=-DX86 -O3 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -mcpu=athlon -Wall -pipe
-#CFLAGS		=-DX86 -O3 -mcpu=pentium -Wall -g -pg
-#CFLAGS		=-DX86 -Wall -pipe -g3 -DEMU64_DEBUG
-#CFLAGS		=-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE
-#CFLAGS		=-DX86 -Wall -pipe -g
+CFLAGS		+=-DX86 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -Wall
 
 CXXFLAGS	=$(CFLAGS)
 
@@ -156,9 +151,9 @@
 LIB		=-lz -lm
 
 ifneq ("$(shell grep GTK2 config.h)","\#define GTK2_SUPPORT 1")
-GTK_FLAGS	=`gtk-config --cflags`
-GTK_LIBS	=`gtk-config --libs`
-GTHREAD_LIBS	=`gtk-config --libs gtk gthread`
+GTK_FLAGS	=`${GTK_CONFIG} --cflags`
+GTK_LIBS	=`${GTK_CONFIG} --libs`
+GTHREAD_LIBS	=`${GTK_CONFIG} --libs gtk gthread`
 else
 GTK_FLAGS	=`pkg-config gtk+-2.0 --cflags` -D_GTK2
 GTK_LIBS	=`pkg-config gtk+-2.0 --libs`
@@ -173,16 +168,16 @@
 all:	mupen64 mupen64_nogui $(PLUGINS)
 
 r4300/interupt.o:	r4300/interupt.c
-			$(CC) $(CFLAGS) `sdl-config --cflags` -c -o $@ $<
+			$(CC) $(CFLAGS) `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 main/main.o:	main/main.c
-		$(CC) $(CFLAGS) -c -o $@ $< `sdl-config --cflags`
+		$(CC) $(CFLAGS) -c -o $@ $< `${SDL_CONFIG} --cflags`
 
 main/main_gtk.o:	main/main_gtk.c
-			$(CC) $(CFLAGS) -c -o $@ $< $(GTK_FLAGS) `sdl-config --cflags`
+			$(CC) $(CFLAGS) -c -o $@ $< $(GTK_FLAGS) `${SDL_CONFIG} --cflags`
 
 main/gui_gtk/main_gtk.o:	main/gui_gtk/main_gtk.c
-				$(CC) $(CFLAGS) -c -o $@ $< $(GTK_FLAGS) `sdl-config --cflags`
+				$(CC) $(CFLAGS) -c -o $@ $< $(GTK_FLAGS) `${SDL_CONFIG} --cflags`
 
 main/gui_gtk/translate.o:	main/gui_gtk/translate.c
 				$(CC) $(CFLAGS) -c -o $@ $< $(GTK_FLAGS)
@@ -218,13 +213,13 @@
 				$(CXX) $(CXXFLAGS) -c -o $@ $< `avifile-config --cflags`
 
 mupen64_input/main.o:		mupen64_input/main.c
-				$(CC) $(CFLAGS) -DUSE_GTK -c -o $@ $< $(GTK_FLAGS) `sdl-config --cflags`
+				$(CC) $(CFLAGS) -DUSE_GTK -c -o $@ $< $(GTK_FLAGS) `${SDL_CONFIG} --cflags`
 
 blight_input/plugin.o:		blight_input/plugin.c
-				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" `sdl-config --cflags` -DGUI_SDL -c -o $@ $<
+				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" `${SDL_CONFIG} --cflags` -DGUI_SDL -c -o $@ $<
 
 blight_input/SDL_ttf.o:		blight_input/SDL_ttf.c
-				$(CC) $(CFLAGS) `freetype-config --cflags` `sdl-config --cflags` -c -o $@ $<
+				$(CC) $(CFLAGS) `freetype-config --cflags` `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 blight_input/arial.ttf.o:	blight_input/arial.ttf.c
 
@@ -234,10 +229,9 @@
 
 blight_input/ttftoh:		blight_input/ttftoh.o
 				$(CC) $^ -o $@
-				strip --strip-all $@
 
 blight_input/configdialog_sdl.o: blight_input/configdialog_sdl.c
-				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" -DGUI_SDL `sdl-config --cflags` -c -o $@ $<
+				$(CC) $(CFLAGS) "-DPACKAGE=\"$(shell grep PACKAGE blight_input/package | cut -d "=" -f 2)\"" "-DVERSION=\"$(shell grep VERSION blight_input/package | cut -d "=" -f 2)\"" -DGUI_SDL `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 blight_input/pad.o:		blight_input/pad.c
 				$(CC) $(CFLAGS) -DGUI_SDL -c -o $@ $<
@@ -249,150 +243,138 @@
 				$(CC) $(CFLAGS) $(GTK_FLAGS) -DUSE_GTK -c -o $@ $<
 
 jttl_audio/main.o:		jttl_audio/main.c
-				$(CC) $(CFLAGS) $(GTK_FLAGS) -DUSE_GTK `sdl-config --cflags` -c -o $@ $<
+				$(CC) $(CFLAGS) $(GTK_FLAGS) -DUSE_GTK `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 mupen64_soft_gfx/main.o:	mupen64_soft_gfx/main.cpp
-				$(CXX) $(CFLAGS) `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 mupen64_soft_gfx/vi_SDL.o:	mupen64_soft_gfx/vi_SDL.cpp
-				$(CXX) $(CFLAGS) `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/glN64.o:			glN64/glN64.cpp
-				$(CXX) $(CFLAGS) -DMAINDEF -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -DMAINDEF -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/Config_linux.o:		glN64/Config_linux.cpp
-				$(CXX) $(CFLAGS) $(GTK_FLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) $(GTK_FLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/OpenGL.o:			glN64/OpenGL.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/N64.o:			glN64/N64.cpp
 				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM -c -o $@ $<
 
 glN64/RSP.o:			glN64/RSP.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/VI.o:			glN64/VI.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/Textures.o:		glN64/Textures.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/FrameBuffer.o:		glN64/FrameBuffer.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/Combiner.o:		glN64/Combiner.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/gDP.o:			glN64/gDP.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/gSP.o:			glN64/gSP.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/GBI.o:			glN64/GBI.cpp
-				$(CXX) $(CFLAGS) $(GTK_FLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) $(GTK_FLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/CRC.o:			glN64/CRC.cpp
 				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM -c -o $@ $<
 
 glN64/NV_register_combiners.o:	glN64/NV_register_combiners.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/texture_env.o:		glN64/texture_env.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/texture_env_combine.o:	glN64/texture_env_combine.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/RDP.o:			glN64/RDP.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3D.o:			glN64/F3D.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3DEX.o:			glN64/F3DEX.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3DEX2.o:			glN64/F3DEX2.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/L3D.o:			glN64/L3D.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/L3DEX.o:			glN64/L3DEX.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/L3DEX2.o:			glN64/L3DEX2.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/S2DEX.o:			glN64/S2DEX.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/S2DEX2.o:			glN64/S2DEX2.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3DPD.o:			glN64/F3DPD.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3DDKR.o:			glN64/F3DDKR.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 glN64/F3DWRUS.o:		glN64/F3DWRUS.cpp
-				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `sdl-config --cflags` -c -o $@ $<
+				$(CXX) $(CFLAGS) -D__LINUX__ -DX86_ASM `${SDL_CONFIG} --cflags` -c -o $@ $<
 
 mupen64_nogui:	$(OBJ) $(OBJ_X86) main/main.o main/gui_gtk/config.o
-		$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
-		strip --strip-all $@
+		$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `${SDL_CONFIG} --libs` -lGL -o $@
 
 ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1")
 
 mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI)
-		$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@
-		strip --strip-all $@
+		$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `${SDL_CONFIG} --libs` -lGL -o $@
 
 else
 
 mupen64:	$(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) $(OBJ_VCR)
-		$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
-		strip --strip-all $@
+		$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `${SDL_CONFIG} --libs` -L${X11BASE}/lib -lGL -o $@
 endif
 
 mupen64_oldgui:	$(OBJ) $(OBJ_X86) main/main_gtk.o
-		$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@
-		strip --strip-all $@
+		$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `${SDL_CONFIG} --libs` -L${X11BASE}/lib -lGL -o $@
 
 plugins/mupen64_input.so: $(OBJ_INPUT)
 			  $(CC) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
-			  strip --strip-all $@
 
 plugins/blight_input.so: $(OBJ_BLIGHT)
-			 $(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` `freetype-config --libs` -o $@
-			 strip --strip-all $@
+			 $(CC) $^ -Wl,-Bsymbolic -shared `${SDL_CONFIG} --libs` `freetype-config --libs` -o $@
 
 plugins/mupen64_hle_rsp_azimer.so: $(OBJ_RSPHLE)
 				   $(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@
-				   strip --strip-all $@
 
 plugins/dummyaudio.so:	$(OBJ_DUMMY)
 			$(CC) $^ -Wl,-Bsymbolic -shared -o $@
-			strip --strip-all $@
 
 plugins/mupen64_audio.so:	$(OBJ_AUDIO)
-				$(CC) $(GTK_LIBS) -lpthread $^ -Wl,-Bsymbolic -shared -o $@
-				strip --strip-all $@
+				$(CC) $(GTK_LIBS) ${PTHREAD_LIBS} $^ -Wl,-Bsymbolic -shared -o $@
 
 plugins/jttl_audio.so:	$(OBJ_JTTL)
-			$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` $(GTK_LIBS) -o $@
-			strip --strip-all $@
+			$(CC) $^ -Wl,-Bsymbolic -shared `${SDL_CONFIG} --libs` $(GTK_LIBS) -o $@
 
 plugins/mupen64_soft_gfx.so:	$(OBJ_SOFT_GFX)
-				$(CXX) `sdl-config --libs` $^ -Wl,-Bsymbolic -shared -o $@
-				strip --strip-all $@
+				$(CXX) `${SDL_CONFIG} --libs` $^ -Wl,-Bsymbolic -shared -o $@
 
 plugins/glN64.so:	$(OBJ_GLN64)
-			$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `sdl-config --libs` -lGL -o $@
-			strip --strip-all $@
+			$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `${SDL_CONFIG} --libs` -lGL -o $@
 
 install:
 	cp mupen64 "$(PREFIX)bin"