Lines 1-16
Link Here
|
1 |
#Makefile MUPEN64 for Linux |
1 |
#Makefile MUPEN64 for Linux |
2 |
|
2 |
|
3 |
CC =gcc |
3 |
CC ?=gcc |
4 |
CXX =g++ |
4 |
CXX ?=g++ |
5 |
|
5 |
|
6 |
#CFLAGS =-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG |
6 |
#CFLAGS =-DX86 -O3 -mpentium -Wall -DEMU64_DEBUG |
7 |
CFLAGS =-DX86 -O3 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -mcpu=athlon -Wall -pipe |
7 |
CFLAGS ?=-DX86 -O3 -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -ffast-math -fno-strict-aliasing -mcpu=athlon -Wall -pipe |
8 |
#CFLAGS =-DX86 -O3 -mcpu=pentium -Wall -g -pg |
8 |
#CFLAGS =-DX86 -O3 -mcpu=pentium -Wall -g -pg |
9 |
#CFLAGS =-DX86 -Wall -pipe -g3 -DEMU64_DEBUG |
9 |
#CFLAGS =-DX86 -Wall -pipe -g3 -DEMU64_DEBUG |
10 |
#CFLAGS =-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE |
10 |
#CFLAGS =-DX86 -Wall -pipe -g -DEMU64_DEBUG -DCOMPARE_CORE |
11 |
#CFLAGS =-DX86 -Wall -pipe -g |
11 |
#CFLAGS =-DX86 -Wall -pipe -g |
12 |
|
12 |
|
13 |
CXXFLAGS =$(CFLAGS) |
13 |
CFLAGS += -fPIC |
|
|
14 |
CXXFLAGS += -fPIC |
15 |
|
16 |
CXXFLAGS ?=$(CFLAGS) |
14 |
|
17 |
|
15 |
GL_PATH =-I/usr/X11R6/include |
18 |
GL_PATH =-I/usr/X11R6/include |
16 |
|
19 |
|
Lines 80-86
Link Here
|
80 |
OBJ_INPUT =mupen64_input/main.o |
83 |
OBJ_INPUT =mupen64_input/main.o |
81 |
|
84 |
|
82 |
OBJ_BLIGHT =blight_input/plugin.o \ |
85 |
OBJ_BLIGHT =blight_input/plugin.o \ |
83 |
blight_input/SDL_ttf.o \ |
|
|
84 |
blight_input/arial.ttf.o \ |
86 |
blight_input/arial.ttf.o \ |
85 |
blight_input/configdialog_sdl.o \ |
87 |
blight_input/configdialog_sdl.o \ |
86 |
blight_input/pad.o |
88 |
blight_input/pad.o |
Lines 166-172
Link Here
|
166 |
endif |
168 |
endif |
167 |
|
169 |
|
168 |
PREFIX =$(shell grep WITH_HOME config.h | cut -d '"' -f 2) |
170 |
PREFIX =$(shell grep WITH_HOME config.h | cut -d '"' -f 2) |
169 |
SHARE ="$(PREFIX)share/mupen64/" |
171 |
SHARE =$(shell grep "define SHARE" config.h | cut -d '"' -f 2) |
|
|
172 |
|
173 |
ifeq ("$(SHARE)","") |
174 |
SHARE ="$(PREFIX)/share/mupen64/" |
175 |
CFLAGS += -DSHARE=\"$(SHARE)\" |
176 |
endif |
170 |
|
177 |
|
171 |
PLUGINS =plugins/mupen64_input.so plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so |
178 |
PLUGINS =plugins/mupen64_input.so plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so |
172 |
|
179 |
|
Lines 223-231
Link Here
|
223 |
blight_input/plugin.o: blight_input/plugin.c |
230 |
blight_input/plugin.o: blight_input/plugin.c |
224 |
$(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 $@ $< |
231 |
$(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 $@ $< |
225 |
|
232 |
|
226 |
blight_input/SDL_ttf.o: blight_input/SDL_ttf.c |
|
|
227 |
$(CC) $(CFLAGS) `freetype-config --cflags` `sdl-config --cflags` -c -o $@ $< |
228 |
|
229 |
blight_input/arial.ttf.o: blight_input/arial.ttf.c |
233 |
blight_input/arial.ttf.o: blight_input/arial.ttf.c |
230 |
|
234 |
|
231 |
blight_input/arial.ttf.c: blight_input/ttftoh |
235 |
blight_input/arial.ttf.c: blight_input/ttftoh |
Lines 234-240
Link Here
|
234 |
|
238 |
|
235 |
blight_input/ttftoh: blight_input/ttftoh.o |
239 |
blight_input/ttftoh: blight_input/ttftoh.o |
236 |
$(CC) $^ -o $@ |
240 |
$(CC) $^ -o $@ |
237 |
strip --strip-all $@ |
|
|
238 |
|
241 |
|
239 |
blight_input/configdialog_sdl.o: blight_input/configdialog_sdl.c |
242 |
blight_input/configdialog_sdl.o: blight_input/configdialog_sdl.c |
240 |
$(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 $@ $< |
243 |
$(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 $@ $< |
Lines 343-398
Link Here
|
343 |
|
346 |
|
344 |
mupen64_nogui: $(OBJ) $(OBJ_X86) main/main.o main/gui_gtk/config.o |
347 |
mupen64_nogui: $(OBJ) $(OBJ_X86) main/main.o main/gui_gtk/config.o |
345 |
$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@ |
348 |
$(CC) $^ $(LIB) -Wl,-export-dynamic -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@ |
346 |
strip --strip-all $@ |
|
|
347 |
|
349 |
|
348 |
ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1") |
350 |
ifneq ("$(shell grep VCR config.h)","\#define VCR_SUPPORT 1") |
349 |
|
351 |
|
350 |
mupen64: $(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) |
352 |
mupen64: $(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) |
351 |
$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@ |
353 |
$(CC) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) -L/usr/X11R6/lib `sdl-config --libs` -lGL -lpthread -ldl -o $@ |
352 |
strip --strip-all $@ |
|
|
353 |
|
354 |
|
354 |
else |
355 |
else |
355 |
|
356 |
|
356 |
mupen64: $(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) $(OBJ_VCR) |
357 |
mupen64: $(OBJ) $(OBJ_X86) $(OBJ_GTK_GUI) $(OBJ_VCR) |
357 |
$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@ |
358 |
$(CXX) $^ $(CFLAGS) $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `avifile-config --libs` `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@ |
358 |
strip --strip-all $@ |
|
|
359 |
endif |
359 |
endif |
360 |
|
360 |
|
361 |
mupen64_oldgui: $(OBJ) $(OBJ_X86) main/main_gtk.o |
361 |
mupen64_oldgui: $(OBJ) $(OBJ_X86) main/main_gtk.o |
362 |
$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@ |
362 |
$(CC) $^ $(LIB) -Wl,-export-dynamic $(GTK_LIBS) `sdl-config --libs` -L/usr/X11R6/lib -lGL -lpthread -ldl -o $@ |
363 |
strip --strip-all $@ |
|
|
364 |
|
363 |
|
365 |
plugins/mupen64_input.so: $(OBJ_INPUT) |
364 |
plugins/mupen64_input.so: $(OBJ_INPUT) |
366 |
$(CC) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@ |
365 |
$(CC) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@ |
367 |
strip --strip-all $@ |
|
|
368 |
|
366 |
|
369 |
plugins/blight_input.so: $(OBJ_BLIGHT) |
367 |
plugins/blight_input.so: $(OBJ_BLIGHT) |
370 |
$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` `freetype-config --libs` -o $@ |
368 |
$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` -lSDL_ttf -o $@ |
371 |
strip --strip-all $@ |
|
|
372 |
|
369 |
|
373 |
plugins/mupen64_hle_rsp_azimer.so: $(OBJ_RSPHLE) |
370 |
plugins/mupen64_hle_rsp_azimer.so: $(OBJ_RSPHLE) |
374 |
$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@ |
371 |
$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) -o $@ |
375 |
strip --strip-all $@ |
|
|
376 |
|
372 |
|
377 |
plugins/dummyaudio.so: $(OBJ_DUMMY) |
373 |
plugins/dummyaudio.so: $(OBJ_DUMMY) |
378 |
$(CC) $^ -Wl,-Bsymbolic -shared -o $@ |
374 |
$(CC) $^ -Wl,-Bsymbolic -shared -o $@ |
379 |
strip --strip-all $@ |
|
|
380 |
|
375 |
|
381 |
plugins/mupen64_audio.so: $(OBJ_AUDIO) |
376 |
plugins/mupen64_audio.so: $(OBJ_AUDIO) |
382 |
$(CC) $(GTK_LIBS) -lpthread $^ -Wl,-Bsymbolic -shared -o $@ |
377 |
$(CC) $(GTK_LIBS) -lpthread $^ -Wl,-Bsymbolic -shared -o $@ |
383 |
strip --strip-all $@ |
|
|
384 |
|
378 |
|
385 |
plugins/jttl_audio.so: $(OBJ_JTTL) |
379 |
plugins/jttl_audio.so: $(OBJ_JTTL) |
386 |
$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` $(GTK_LIBS) -o $@ |
380 |
$(CC) $^ -Wl,-Bsymbolic -shared `sdl-config --libs` $(GTK_LIBS) -o $@ |
387 |
strip --strip-all $@ |
|
|
388 |
|
381 |
|
389 |
plugins/mupen64_soft_gfx.so: $(OBJ_SOFT_GFX) |
382 |
plugins/mupen64_soft_gfx.so: $(OBJ_SOFT_GFX) |
390 |
$(CXX) `sdl-config --libs` $^ -Wl,-Bsymbolic -shared -o $@ |
383 |
$(CXX) `sdl-config --libs` $^ -Wl,-Bsymbolic -shared -o $@ |
391 |
strip --strip-all $@ |
|
|
392 |
|
384 |
|
393 |
plugins/glN64.so: $(OBJ_GLN64) |
385 |
plugins/glN64.so: $(OBJ_GLN64) |
394 |
$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `sdl-config --libs` -lGL -o $@ |
386 |
$(CXX) $^ -Wl,-Bsymbolic -shared $(GTK_LIBS) $(GTHREAD_LIBS) `sdl-config --libs` -lGL -o $@ |
395 |
strip --strip-all $@ |
|
|
396 |
|
387 |
|
397 |
install: |
388 |
install: |
398 |
cp mupen64 "$(PREFIX)bin" |
389 |
cp mupen64 "$(PREFIX)bin" |
Lines 405-411
Link Here
|
405 |
|
396 |
|
406 |
clean: |
397 |
clean: |
407 |
find . -name '*.o' -print0 | xargs -0r rm -f |
398 |
find . -name '*.o' -print0 | xargs -0r rm -f |
408 |
rm mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so |
399 |
rm -f mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so |
409 |
|
400 |
|
410 |
clean_o: |
401 |
clean_o: |
411 |
find . -name '*.o' -print0 | xargs -0r rm -f |
402 |
find . -name '*.o' -print0 | xargs -0r rm -f |