\r
# settings\r
#mz80 = 1\r
-debug_cyclone = 0\r
+#debug_cyclone = 1\r
asm_memory = 1\r
asm_render = 1\r
asm_ym2612 = 1\r
asm_misc = 1\r
asm_cdpico = 1\r
asm_cdmemory = 1\r
+amalgamate = 0\r
#profile = 1\r
#use_musashi = 1\r
#up = 1\r
endif\r
\r
DEFINC = -I../.. -I. -DARM -D__GP2X__ -D_UNZIP_SUPPORT # -DBENCHMARK\r
-COPT_COMMON = -static -Wall -O3 -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math # -s\r
+COPT_COMMON = -static -Wall -O2 -ftracer -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math -Winline\r
ifeq "$(profile)" "1"\r
COPT_COMMON += -fprofile-generate\r
endif\r
OBJCOPY = $(CROSS)objcopy\r
\r
# frontend\r
-OBJS += main.o menu.o fonts.o gp2x.o usbjoy.o emu.o squidgehack.o asmutils.o cpuctrl.o\r
+OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o\r
# 940 core control\r
OBJS += 940ctl.o\r
+\r
+# common\r
+OBJS += ../common/menu.o ../common/fonts.o ../common/arm_utils.o ../common/readpng.o\r
+\r
# Pico\r
-OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Utils.o ../../Pico/Memory.o ../../Pico/Misc.o \\r
+ifeq "$(amalgamate)" "1"\r
+OBJS += ../../PicoAll.o\r
+else\r
+OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \\r
../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \\r
../../Pico/Patch.o\r
# Pico - CD\r
OBJS += ../../Pico/cd/Pico.o ../../Pico/cd/Memory.o ../../Pico/cd/Sek.o ../../Pico/cd/LC89510.o \\r
../../Pico/cd/cd_sys.o ../../Pico/cd/cd_file.o ../../Pico/cd/gfx_cd.o \\r
../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o\r
+endif\r
+\r
# asm stuff\r
ifeq "$(asm_render)" "1"\r
DEFINC += -D_ASM_DRAW_C\r
DEFINC += -D_ASM_CD_MEMORY_C\r
OBJS += ../../Pico/cd/memory_asm.o\r
endif\r
+\r
# Pico - sound\r
+ifneq "$(amalgamate)" "1"\r
+OBJS += ../../Pico/sound/sound.o\r
+endif\r
OBJS += ../../Pico/sound/mix_asm.o\r
-OBJS += ../../Pico/sound/sound.o ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
+OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o\r
# zlib\r
OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \\r
../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o\r
\r
PicoDrive.gpe : $(OBJS) helix/helix_mp3.a\r
@echo $@\r
- @$(GCC) -o $@ $(COPT) $^ -lm -Wl,-Map=PicoDrive.map\r
+ @$(GCC) -o $@ $(COPT) $^ -lm -lpng -Wl,-Map=PicoDrive.map\r
ifeq ($(DEBUG),)\r
@$(STRIP) $@\r
endif\r
# @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\\r
\r
\r
-testrefr.gpe : test.o gp2x.o asmutils.o\r
+testrefr.gpe : test.o gp2x.o\r
@echo $@\r
@$(GCC) $(COPT) $^ -o $@\r
@$(STRIP) $@\r
# build Cyclone\r
../../cpu/Cyclone/proj/Cyclone.s :\r
@echo building Cyclone...\r
- @make -C ../../cpu/Cyclone/proj\r
+ @make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h\r
\r
../../cpu/musashi/m68kops.c :\r
@make -C ../../cpu/musashi\r
endif\r
endif\r
\r
-rel: PicoDrive.gpe code940/code940.bin ../readme.txt config.txt PicoDrive.man.txt PicoDrive.png\r
+rel: PicoDrive.gpe code940/pico940.bin ../readme.txt config.txt PicoDrive.man.txt PicoDrive.png\r
zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o\r
+ zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt\r
\r
code940/code940.bin:\r
make -C code940/\r
\r
-\r
-# test\r
-#usbjoy.o : usbjoy.c\r
-# @echo $<\r
-# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
-#\r
-#../../Pico/Cart.o : ../../Pico/Cart.c\r
-# @echo $<\r
-# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
-#\r
-#../../zlib/trees.o : ../../zlib/trees.c\r
-# @echo $<\r
-# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
-\r