2 # pspdev is expected to be in path
\r
3 PSPSDK = $(shell psp-config --pspsdk-path)
\r
13 CFLAGS += -I../.. -I. -D_UNZIP_SUPPORT -DNO_SYNC # -DBENCHMARK
\r
14 CFLAGS += -Wall -Winline -G0
\r
16 CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math
\r
20 ifeq "$(profile)" "1"
\r
21 CFLAGS += -fprofile-generate
\r
23 ifeq "$(profile)" "2"
\r
24 CFLAGS += -fprofile-use
\r
29 OBJS += main.o emu.o mp3.o menu.o psp.o
\r
32 OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/readpng.o
\r
35 ifeq "$(amalgamate)" "1"
\r
36 OBJS += ../../PicoAll.o
\r
38 OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \
\r
39 ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \
\r
40 ../../Pico/Patch.o ../../Pico/Draw_amips.o
\r
42 OBJS += ../../Pico/cd/Pico.o ../../Pico/cd/Memory.o ../../Pico/cd/Sek.o ../../Pico/cd/LC89510.o \
\r
43 ../../Pico/cd/cd_sys.o ../../Pico/cd/cd_file.o ../../Pico/cd/gfx_cd.o \
\r
44 ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o
\r
48 ifneq "$(amalgamate)" "1"
\r
49 OBJS += ../../Pico/sound/sound.o
\r
51 OBJS += ../../Pico/sound/mix.o
\r
52 OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o
\r
54 OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \
\r
55 ../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o \
\r
56 ../../zlib/uncompr.o
\r
58 OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o
\r
60 ifeq "$(use_musashi)" "1"
\r
61 CFLAGS += -DEMU_M68K
\r
62 OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o
\r
64 CFLAGS += -DEMU_F68K
\r
65 OBJS += ../../cpu/fame/famec.o
\r
68 ifeq "$(use_mz80)" "1"
\r
69 CFLAGS += -D_USE_MZ80
\r
70 OBJS += ../../cpu/mz80/mz80.o
\r
72 CFLAGS += -D_USE_CZ80
\r
73 OBJS += ../../cpu/cz80/cz80.o
\r
76 OBJS += data/bg32.o data/bg40.o
\r
79 LIBS += -lpng -lm -lpspgu -lpsppower -Wl,-Map=PicoDrive.map -lpspaudio
\r
83 EXTRA_TARGETS = EBOOT.PBP
\r
84 PSP_EBOOT_TITLE = PICODRIVE
\r
85 #PSP_EBOOT_ICON = .png
\r
86 #PSP_EBOOT_PIC1 = .png
\r
88 CUSTOM_CLEAN = myclean
\r
90 include $(PSPSDK)/lib/build.mak
\r
92 # some additional rules
\r
95 $(CC) $(CFLAGS) -c $< -o $@
\r
101 $(AS) -march=allegrex -mtune=allegrex $< -o $@
\r
103 ../../cpu/musashi/m68kops.c :
\r
104 make -C ../../cpu/musashi
\r
106 readme.txt: ../../tools/textfilter ../base_readme.txt
\r
107 ../../tools/textfilter ../base_readme.txt $@ PSP
\r
109 ../../tools/textfilter: ../../tools/textfilter.c
\r
110 make -C ../../tools/ textfilter
\r
112 ../../cpu/fame/famec.o : ../../cpu/fame/famec.c
\r
114 $(CC) $(CFLAGS) -Wno-unused -c $< -o $@
\r
116 data/bg32.o: data/bg32.bin
\r
117 bin2o -i $< $@ bgdatac32
\r
119 data/bg40.o: data/bg40.bin
\r
120 bin2o -i $< $@ bgdatac40
\r
124 @cp -v $^ /media/disk/PSP/GAME/PicoDrive/
\r
130 make -C ../../cpu/musashi clean
\r
134 find ../.. -name '*.gcno' -delete
\r
135 find ../.. -name '*.gcda' -delete
\r
137 # ----------- release -----------
\r
138 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
\r
145 rel: EBOOT.PBP readme.txt
\r
146 zip -9 -j ../../PicoDrive_$(VER).zip $^
\r
147 # zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt
\r