2 # you may or may not need to change this
\r
3 export CROSS = /opt/cegcc/arm-wince-cegcc/bin/
\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 COPT = $(COPT_COMMON) -mtune=arm920t
\r
31 ASFLAGS = -mcpu=arm920t -mfloat-abi=soft
\r
33 STRIP = $(CROSS)strip
\r
38 OBJS += main.o emu.o menu.o giz.o asm_utils.o
\r
41 OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/arm_utils.o \
\r
42 ../common/readpng.o ../common/mp3_helix.o
\r
45 ifeq "$(amalgamate)" "1"
\r
46 OBJS += ../../PicoAll.o
\r
48 OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \
\r
49 ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.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 \
\r
54 ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o
\r
58 ifeq "$(asm_render)" "1"
\r
59 DEFINC += -D_ASM_DRAW_C
\r
60 OBJS += ../../Pico/draw_asm.o ../../Pico/draw2_asm.o
\r
62 ifeq "$(asm_memory)" "1"
\r
63 DEFINC += -D_ASM_MEMORY_C
\r
64 OBJS += ../../Pico/memory_asm.o
\r
66 ifeq "$(asm_ym2612)" "1"
\r
67 DEFINC += -D_ASM_YM2612_C
\r
68 OBJS += ../../Pico/sound/ym2612_asm.o
\r
70 ifeq "$(asm_misc)" "1"
\r
71 DEFINC += -D_ASM_MISC_C
\r
72 OBJS += ../../Pico/misc_asm.o
\r
73 OBJS += ../../Pico/cd/misc_asm.o
\r
75 ifeq "$(asm_cdpico)" "1"
\r
76 DEFINC += -D_ASM_CD_PICO_C
\r
77 OBJS += ../../Pico/cd/pico_asm.o
\r
79 ifeq "$(asm_cdmemory)" "1"
\r
80 DEFINC += -D_ASM_CD_MEMORY_C
\r
81 OBJS += ../../Pico/cd/memory_asm.o
\r
85 ifneq "$(amalgamate)" "1"
\r
86 OBJS += ../../Pico/sound/sound.o
\r
88 OBJS += ../../Pico/sound/mix_asm.o
\r
89 OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o
\r
91 OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \
\r
92 ../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o
\r
94 OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o
\r
97 DEFINC += -DEMU_C68K
\r
98 OBJS += ../../cpu/Cyclone/proj/Cyclone.o
\r
100 DEFINC += -D_USE_DRZ80
\r
101 OBJS += ../../cpu/DrZ80/drz80.o
\r
104 all: PicoDrive.exe readme.txt
\r
106 PicoDrive.exe : $(OBJS) ../common/helix/helix_mp3.a
\r
108 $(GCC) -o $@ -static $(COPT) $^ -lm -lpng -Lkgsdk/ -lKGSDK -Wl,-Map=PicoDrive.map 2>&1 | \
\r
109 grep -v ".idata$$4" # | grep -v "supports interworking, whereas"
\r
117 $(GCC) $(COPT) $(DEFINC) -c $< -o $@
\r
120 # $(GCC) $(COPT) $(DEFINC) -c $< -o $@
\r
122 ../../Pico/draw_asm.o : ../../Pico/Draw.s
\r
124 @$(AS) $(ASFLAGS) $< -o $@
\r
125 ../../Pico/draw2_asm.o : ../../Pico/Draw2.s
\r
127 @$(AS) $(ASFLAGS) $< -o $@
\r
128 ../../Pico/memory_asm.o : ../../Pico/Memory.s
\r
130 @$(AS) $(ASFLAGS) $< -o $@
\r
131 ../../Pico/sound/ym2612_asm.o : ../../Pico/sound/ym2612.s
\r
133 @$(AS) $(ASFLAGS) $< -o $@
\r
134 ../../Pico/sound/mix_asm.o : ../../Pico/sound/mix.s
\r
136 @$(AS) $(ASFLAGS) $< -o $@
\r
137 ../../Pico/misc_asm.o : ../../Pico/Misc.s
\r
139 @$(AS) $(ASFLAGS) $< -o $@
\r
140 ../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s
\r
142 @$(AS) $(ASFLAGS) $< -o $@
\r
143 ../../Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s
\r
145 @$(AS) $(ASFLAGS) $< -o $@
\r
146 ../../Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s
\r
148 @$(AS) $(ASFLAGS) $< -o $@
\r
151 ../../cpu/Cyclone/proj/Cyclone.s:
\r
152 @echo building Cyclone...
\r
153 @make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h
\r
156 ../common/helix/helix_mp3.a:
\r
157 make -C ../common/helix
\r
159 readme.txt: ../../tools/textfilter ../base_readme.txt
\r
160 ../../tools/textfilter ../base_readme.txt $@ GIZ
\r
162 ../../tools/textfilter: ../../tools/textfilter.c
\r
163 make -C ../../tools/ textfilter
\r
168 @$(RM) PicoDrive.exe
\r
174 find ../.. -name '*.gcno' -delete
\r
175 find ../.. -name '*.gcda' -delete
\r
178 synce-pcp -d 3 PicoDrive.exe ":/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
181 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
184 synce-prun "/SD Card/emus/PicoDrive/PicoDrive.exe"
\r
186 # ----------- release -----------
\r
187 ifneq ($(findstring rel,$(MAKECMDGOALS)),)
\r
193 rel: PicoDrive.exe kgsdk/ARMV4IRel/KGSDK.dll readme.txt
\r
194 zip -9 -j ../../PicoDrive_$(VER).zip $^
\r
195 ln -s ../gp2x/skin skin
\r
196 zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt
\r