-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.psp.o2
161 lines (122 loc) · 4.86 KB
/
Makefile.psp.o2
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
TARGET = MasterBoy
PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
OBJS = gbcore/apu.o gbcore/cheat.o gbcore/cpu.o gbcore/gb.o gbcore/lcd.o gbcore/mbc.o gbcore/rom.o gbcore/sgb.o
OBJS += cpu/z80.o \
memz80.o \
pio.o \
vdp.o \
render.o \
sms.o \
system.o
OBJS += sound/sound.o \
sound/sn76489.o \
sound/emu2413.o \
sound/ym2413.o \
sound/fmintf.o \
sound/stream.o
OBJS += psp/gameboy_render.o
OBJS += psp/VideoGu.o \
psp/Controls.o \
psp/PspSound.o \
psp/SMS.o
OBJS += psp/main.o \
psp/menuplus.o \
psp/menuplus2.o \
psp/config.o \
psp/usb.o
OBJS += psp/sound.o
OBJS += fileio.o \
state.o \
loadrom.o
OBJS += unzip/ioapi.o \
unzip/unzip.o
OBJS += psp/gym/gym.o psp/gym/gym_play.o psp/gym/psg.o psp/gym/ym2612.o
OBJS += psp/gym/bzlib/blocksort.o psp/gym/bzlib/bzlib.o psp/gym/bzlib/compress.o psp/gym/bzlib/crctable.o \
psp/gym/bzlib/decompress.o psp/gym/bzlib/huffman.o psp/gym/bzlib/randtable.o
OBJS += psp/vgm/mame_fm.o psp/vgm/emu2413.o psp/vgm/sn76489.o psp/vgm/mame_ym2151.o psp/vgm/In_vgm.o
OBJS += psp/gz.o psp/VirtualGz.o psp/deflate.o psp/gzio.o
OBJS += error.o
# OBJS += psp/Adhoc/selectorMenu.o \
psp/Adhoc/loadutil.o \
psp/Adhoc/pspadhoc.o \
psp/Adhoc/stubs.o
INCDIR =
BASECFLAGS = -G0 \
-I. -Icpu -Isound -Iunzip -Ipsp -DLSB_FIRST \
-DALIGN_DWORD -DDOS -DPSP -DUSE_ZLIB -fno-align-functions
# -DALIGN_DWORD -DDOS -DPSP -DUSE_ZLIB -fno-align-loops -fno-align-jumps -fno-align-functions -fno-align-labels -fno-reorder-blocks -fno-reorder-blocks-and-partition -fno-prefetch-loop-arrays -fno-tree-vect-loop-version -fno-tree-loop-optimize -fno-strict-aliasing
#-fno-reorder-blocks -fno-align-functions
# Note that O3 is not optimal, at least for SMS. But for GB it gives an huge improvement, so I globally enabled it; if someone can tell me how to only compile some files (i.e. those in the gbcore directory) it would be very nice, thanks :)
CFLAGS = -O2 $(BASECFLAGS)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -Wpointer-arith
ASFLAGS = -c $(CFLAGS)
LIBDIR =
LDFLAGS = -Wl,-Map -Wl,MasterBoy.map
#LDFLAGS =
LIBS = -losl -lpng -lz \
-lpspsdk -lpsphprm -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspusb -lpspusbstor -lpspgu -lpspaudiolib -lpspaudio -lstdc++ -lm
#EXTRA_TARGETS = kxploit
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = MasterBoy v2.01
#PSP_EBOOT_ICON = ICON0.png
#PSP_EBOOT_PIC1 = PIC1.png
#PSP_EBOOT_SND0 = lw2.at3
include $(PSPSDK)/lib/build.mak
#Game Boy
gbcore/apu.o: gbcore/apu.c
$(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
gbcore/cpu.o: gbcore/cpu.c
$(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#gbcore/gb.o: gbcore/gb.c
# $(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
gbcore/lcd.o: gbcore/lcd.c
$(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#gbcore/mbc.o: gbcore/mbc.c
# $(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#gbcore/rom.o: gbcore/rom.c
# $(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#gbcore/sgb.o: gbcore/sgb.c
# $(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#psp/gameboy_render.o: psp/gameboy_render.c
# $(CC) $(addprefix -I,$(INCDIR)) -O3 $(BASECFLAGS) -c -o $@ $<
#Master System
#User Interface
main.o: main.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
menuplus.o: menuplus.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
menuplus2.o: menuplus2.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
config.o: config.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
usb.o: usb.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
fileio.o: fileio.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
state.o: state.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
loadrom.o: loadrom.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
unzip/ioapi.o: unzip/ioapi.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
unzip/unzip.o: unzip/unzip.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/vgm/mame_fm.o: psp/vgm/mame_fm.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/vgm/emu2413.o: psp/vgm/emu2413.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/vgm/sn76489.o: psp/vgm/sn76489.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/vgm/mame_ym2151.o: psp/vgm/mame_ym2151.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/gz.o: psp/gz.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/VirtualGz.o: psp/VirtualGz.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/deflate.o: psp/deflate.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
psp/gzio.o: psp/gzio.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<
error.o: error.c
$(CC) $(addprefix -I,$(INCDIR)) -Os $(BASECFLAGS) -c -o $@ $<