1 export CROSS = arm-linux-
\r
6 #asm_memory = 1 # TODO
\r
11 #asm_cdmemory = 1 # TODO
\r
18 ifeq "$(debug_cyclone)" "1"
\r
22 ifeq "$(use_musashi)" "1"
\r
30 DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X -DIN_EVDEV # -DBENCHMARK
\r
31 CFLAGS += -Wall -Winline
\r
33 CFLAGS += -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math
\r
37 ifeq "$(profile)" "1"
\r
38 CFLAGS += -fprofile-generate
\r
40 ifeq "$(profile)" "2"
\r
41 CFLAGS += -fprofile-use
\r
43 CFLAGS += -mcpu=arm920t -mtune=arm920t
\r
45 ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
\r
47 STRIP = $(CROSS)strip
\r
50 OBJCOPY = $(CROSS)objcopy
\r
53 OBJS += plat.o warm.o pollux_set.o soc.o soc_mmsp2.o soc_pollux.o emu.o in_gp2x.o
\r
58 OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \
\r
59 platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \
\r
60 platform/common/mp3_helix.o platform/common/input.o platform/common/main.o \
\r
61 platform/linux/sndout_oss.o platform/linux/plat.o platform/linux/in_evdev.o
\r
64 ifeq "$(amalgamate)" "1"
\r
65 OBJS += ../../picoAll.o
\r
67 OBJS += pico/area.o pico/cart.o pico/memory.o pico/pico.o pico/sek.o pico/z80if.o \
\r
68 pico/videoport.o pico/draw2.o pico/draw.o pico/mode4.o pico/sms.o \
\r
69 pico/misc.o pico/eeprom.o pico/patch.o pico/debug.o
\r
71 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
\r
72 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \
\r
73 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
\r
76 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
\r
78 OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
\r
79 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o
\r
82 ifneq "$(amalgamate)" "1"
\r
83 OBJS += pico/sound/sound.o
\r
85 OBJS += pico/sound/mix_arm.o
\r
86 OBJS += pico/sound/sn76496.o pico/sound/ym2612.o
\r
88 OBJS += unzip/unzip.o unzip/unzip_stream.o
\r
90 OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
\r
91 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o
\r
93 ifeq "$(debug_cyclone)" "1"
\r
94 OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o
\r
97 ifeq "$(use_musashi)" "1"
\r
98 DEFINC += -DEMU_M68K
\r
99 OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
\r
101 ifeq "$(use_cyclone)" "1"
\r
102 DEFINC += -DEMU_C68K
\r
103 OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o
\r
106 DEFINC += -D_USE_MZ80
\r
107 OBJS += cpu/mz80/mz80.o
\r
109 DEFINC += -D_USE_DRZ80
\r
110 OBJS += cpu/DrZ80/drz80.o
\r
117 DIRS = platform platform/gp2x platform/linux platform/common pico pico/cd pico/pico pico/sound \
\r
118 pico/carthw/svp zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80
\r
121 all: mkdirs PicoDrive
\r
123 include ../common/common_arm.mak
\r
124 include ../common/revision.mak
\r
126 # partial linking helps profiled builds due to section merging
\r
127 PicoDrive.o : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a
\r
130 # still using static, dynamic linking slows Wiz 1-10%
\r
131 # also libm on F100 is not compatible
\r
132 PicoDrive : PicoDrive.o
\r
134 $(CC) -static -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map
\r
140 @cp -v PicoDrive /mnt/gp2x/mnt/sd/emus/PicoDrive/
\r
147 readme.txt: ../../tools/textfilter ../base_readme.txt
\r
148 ../../tools/textfilter ../base_readme.txt $@ GP2X
\r
150 # ----------- release -----------
\r
151 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
\r
156 CODE940 = code940/pico940_v3.bin
\r
158 rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt PicoDrive.png ../game_def.cfg \
\r
159 warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko
\r
160 zip -9 -j ../../PicoDrive_$(VER).zip $^
\r
161 zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt
\r
162 mkdir bin_to_cso_mp3
\r
163 cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/
\r
164 zip -9 -r ../../PicoDrive_$(VER).zip bin_to_cso_mp3
\r
165 rm -rf bin_to_cso_mp3
\r