1 export CROSS = arm-linux-
\r
19 ifeq "$(debug_cyclone)" "1"
\r
23 ifeq "$(use_musashi)" "1"
\r
31 DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X -DIN_EVDEV # -DBENCHMARK
\r
32 CFLAGS += -Wall -Winline
\r
34 CFLAGS += -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math
\r
38 ifeq "$(profile)" "1"
\r
39 CFLAGS += -fprofile-generate
\r
41 ifeq "$(profile)" "2"
\r
42 CFLAGS += -fprofile-use
\r
44 CFLAGS += -mcpu=arm920t -mtune=arm920t
\r
46 ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
\r
48 STRIP = $(CROSS)strip
\r
51 OBJCOPY = $(CROSS)objcopy
\r
54 OBJS += plat.o warm.o pollux_set.o soc.o soc_mmsp2.o soc_pollux.o emu.o in_gp2x.o
\r
59 OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \
\r
60 platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \
\r
61 platform/common/mp3_helix.o platform/common/input.o platform/common/main.o \
\r
62 platform/linux/sndout_oss.o platform/linux/plat.o platform/linux/in_evdev.o
\r
65 ifeq "$(amalgamate)" "1"
\r
66 OBJS += ../../picoAll.o
\r
68 OBJS += pico/area.o pico/cart.o pico/memory.o pico/pico.o pico/sek.o pico/z80if.o \
\r
69 pico/videoport.o pico/draw2.o pico/draw.o pico/mode4.o pico/sms.o \
\r
70 pico/misc.o pico/eeprom.o pico/patch.o pico/debug.o
\r
72 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
\r
73 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \
\r
74 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
\r
77 OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/pwm.o
\r
79 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
\r
81 OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
\r
82 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o
\r
85 ifneq "$(amalgamate)" "1"
\r
86 OBJS += pico/sound/sound.o
\r
88 OBJS += pico/sound/mix_arm.o
\r
89 OBJS += pico/sound/sn76496.o pico/sound/ym2612.o
\r
91 OBJS += unzip/unzip.o unzip/unzip_stream.o
\r
93 OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
\r
94 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o
\r
96 ifeq "$(debug_cyclone)" "1"
\r
97 OBJS += pico/DebugCPU.o cpu/musashi/m68kdasm.o
\r
100 ifeq "$(use_musashi)" "1"
\r
101 DEFINC += -DEMU_M68K
\r
102 OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
\r
104 ifeq "$(use_cyclone)" "1"
\r
105 DEFINC += -DEMU_C68K
\r
106 OBJS += pico/m68kif_cyclone.o cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o
\r
109 DEFINC += -D_USE_MZ80
\r
110 OBJS += cpu/mz80/mz80.o
\r
112 DEFINC += -D_USE_DRZ80
\r
113 OBJS += cpu/DrZ80/drz80.o
\r
115 OBJS += cpu/sh2/sh2.o
\r
116 ifeq "$(use_sh2mame)" "1"
\r
117 OBJS += cpu/sh2/mame/sh2pico.o
\r
120 OBJS += cpu/drc/cmn.o
\r
121 OBJS += cpu/drc/cmn_arm.o
\r
127 DIRS = platform platform/gp2x platform/linux platform/common pico pico/cd pico/pico pico/32x \
\r
128 pico/sound pico/carthw/svp zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools \
\r
129 cpu/mz80 cpu/DrZ80 cpu/sh2/mame cpu/drc
\r
132 all: mkdirs PicoDrive
\r
134 include ../common/common_arm.mak
\r
135 include ../common/revision.mak
\r
137 # partial linking helps profiled builds due to section merging
\r
138 PicoDrive.o : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a
\r
141 # still using static, dynamic linking slows Wiz 1-10%
\r
142 # also libm on F100 is not compatible
\r
143 PicoDrive : PicoDrive.o
\r
145 $(CC) -static -o $@ $(CFLAGS) $^ -lm -lpng -Wl,-Map=$@.map
\r
151 @cp -v PicoDrive /mnt/gp2x/mnt/sd/emus/PicoDrive/
\r
158 readme.txt: ../../tools/textfilter ../base_readme.txt
\r
159 ../../tools/textfilter ../base_readme.txt $@ GP2X
\r
161 # ----------- release -----------
\r
162 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
\r
167 CODE940 = code940/pico940_v3.bin
\r
169 rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt PicoDrive.png ../game_def.cfg \
\r
170 warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko
\r
171 zip -9 -j ../../PicoDrive_$(VER).zip $^
\r
172 zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt
\r
173 mkdir bin_to_cso_mp3
\r
174 cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/
\r
175 zip -9 -r ../../PicoDrive_$(VER).zip bin_to_cso_mp3
\r
176 rm -rf bin_to_cso_mp3
\r