2 # you may or may not need to change this
\r
3 export CROSS = arm-wince-cegcc-
\r
17 DEFINC = -I../.. -I. -D__GIZ__ -DNO_SYNC
\r
18 COPT_COMMON = -Wall -Winline
\r
20 COPT_COMMON += -O2 -ftracer -fomit-frame-pointer -fstrict-aliasing -ffast-math
\r
22 COPT_COMMON += -ggdb
\r
24 ifeq "$(profile)" "1"
\r
25 COPT_COMMON += -fprofile-generate
\r
27 ifeq "$(profile)" "2"
\r
28 COPT_COMMON += -fprofile-use
\r
30 CFLAGS = $(COPT_COMMON) -mcpu=arm920t -mtune=arm920t
\r
32 ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
\r
34 STRIP = $(CROSS)strip
\r
39 OBJS += main.o emu.o menu.o giz.o asm_utils.o
\r
42 OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \
\r
43 platform/common/arm_utils.o platform/common/readpng.o platform/common/mp3_helix.o
\r
46 ifeq "$(amalgamate)" "1"
\r
49 OBJS += pico/area.o pico/cart.o pico/memory.o pico/misc.o pico/pico.o pico/sek.o \
\r
50 pico/videoport.o pico/draw2.o pico/draw.o pico/patch.o pico/debug.o
\r
52 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
\r
53 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/gfx_cd.o pico/cd/cue.o \
\r
54 pico/cd/area.o pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
\r
57 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
\r
59 OBJS += pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
\r
60 pico/carthw/svp/ssp16.o pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o
\r
63 ifneq "$(amalgamate)" "1"
\r
64 OBJS += pico/sound/sound.o
\r
66 OBJS += pico/sound/mix_asm.o
\r
67 OBJS += pico/sound/sn76496.o pico/sound/ym2612.o
\r
69 OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
\r
70 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o
\r
72 OBJS += unzip/unzip.o unzip/unzip_stream.o
\r
75 DEFINC += -DEMU_C68K
\r
76 OBJS += cpu/Cyclone/proj/Cyclone.o cpu/Cyclone/tools/idle.o
\r
78 DEFINC += -D_USE_DRZ80
\r
79 OBJS += cpu/DrZ80/drz80.o
\r
84 DIRS = platform platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \
\r
85 zlib unzip cpu cpu/musashi cpu/Cyclone/proj cpu/Cyclone/tools cpu/mz80 cpu/DrZ80
\r
88 all: mkdirs PicoDrive.exe readme.txt
\r
90 PicoDrive.exe : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a
\r
92 $(CC) -o $@ -static $(CFLAGS) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map \
\r
93 2>&1 | grep -v ".idata$$4" # | grep -v "supports interworking, whereas"
\r
97 ifeq "$(profile)" "1"
\r
102 readme.txt: ../../tools/textfilter ../base_readme.txt
\r
103 ../../tools/textfilter ../base_readme.txt $@ GIZ
\r
105 include ../common/common_arm.mak
\r
110 @$(RM) PicoDrive.exe
\r
116 synce-pcp -d 3 PicoDrive.exe ":/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
119 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
122 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
124 # ----------- release -----------
\r
125 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
\r
131 rel: PicoDrive.exe kgsdk/ARMV4IRel/KGSDK.dll ../game_def.cfg readme.txt
\r
132 zip -9 -j ../../PicoDrive_giz_$(VER).zip $^
\r
133 ln -s ../gp2x/skin skin
\r
134 zip -9 -r ../../PicoDrive_giz_$(VER).zip skin -i \*.png -i \*.txt
\r