-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile.opendingux
101 lines (76 loc) · 2.28 KB
/
Makefile.opendingux
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
#
# MSX port on WIZ
#
# Copyright (C) 2009 Ludovic Jacomme ([email protected])
#
MSX_VERSION=1.1.0
TARGET = dingux-msx
SDL_CONFIG = /opt/opendingux-toolchain/usr/bin/sdl-config
OBJS = gp2x_psp.o \
cpudingux.o \
fMSX.o MSX.o Patch.o Sound.o Disk.o \
Z80.o I8255.o AY8910.o YM2413.o SCC.o V9938.o I8251.o \
SDLgfx.o SDLsnd.o SDLfilter.o \
emu2413.o emu2212.o emu2149.o \
fmopl.o ymdeltat.o \
psp_main.o \
psp_sdl.o \
psp_kbd.o \
psp_font.o \
psp_menu.o \
psp_joy.o \
psp_danzeff.o \
psp_menu_set.o \
psp_menu_help.o \
psp_menu_joy.o \
psp_menu_kbd.o \
psp_menu_cheat.o \
psp_menu_list.o \
psp_editor.o \
unzip.o \
ioapi.o \
sha1.o \
psp_fmgr.o
CC=/opt/opendingux-toolchain/usr/bin/mipsel-linux-gcc
STRIP=/opt/opendingux-toolchain/usr/bin/mipsel-linux-strip
DEFAULT_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
MORE_CFLAGS = -DFMSX -DUNIX -DNARROW -DSOUND -DBPP16 -DSDL -DLSB_FIRST \
-I. -I/opt/opendingux-toolchain/usr/include \
-DMPU_JZ4740 -mips32 \
-O3 -fsigned-char -ffast-math -fomit-frame-pointer -fno-strength-reduce \
-DOPENDINGUX_MODE \
-DLINUX_MODE \
-DNO_STDIO_REDIRECT \
-DMSX_VERSION=\"$(MSX_VERSION)\"
#MORE_CFLAGS = -DFMSX -DUNIX -DNARROW -DSOUND -DBPP16 -DSDL -DLSB_FIRST \
#-I. -I/opt/opendingux-toolchain/usr/include \
# -DMPU_JZ4740 -mips32 \
# -O3 -fsigned-char -ffast-math -fomit-frame-pointer -fno-strength-reduce \
# -DNO_STDIO_REDIRECT -DDINGUX_MODE \
# -DMSX_VERSION=\"$(MSX_VERSION)\"
#LDFLAGS = -shared -s -fPIC
LDFLAGS = -s -lm -lz `$(SDL_CONFIG) --libs`
#LIBS += \
#-B/opt/opendingux-toolchain/usr/lib \
#-L/opt/opendingux-toolchain/usr/lib \
#-lpng -lz -lm -lpthread -ldl -fPIC
LIBS += -lSDL_image -lpng \
-lpthread -ldl \
-B/opt/opendingux-toolchain/usr/lib \
-R/opt/opendingux-toolchain/usr/lib \
-L/opt/opendingux-toolchain/usr/lib
MORE_CFLAGS += -O2 -fomit-frame-pointer -ffunction-sections -ffast-math -fsingle-precision-constant -G0
LDFLAGS += -Wl,--gc-sections
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
#/opt/mipsel-linux-uclibc/usr/lib/libSDL_image.a \
#/opt/mipsel-linux-uclibc/usr/lib/libSDL.a \
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARGET) && $(STRIP) $(TARGET)
install: $(TARGET)
cp $< /media/dingux/local/emulators/dingux-msx/
clean:
rm -f $(OBJS) $(TARGET)
ctags:
ctags *[ch]