X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2FMakefile;h=595db535dac8e3a40ddeeeb65ce36bb331f6049e;hb=c2e83bcd16add6d776ea9ace7bc4e2622277f48e;hp=d9c40bb3d8176b0216e6571bfdb6adadc549d0d7;hpb=0ae6813e481cdbb7a661b49dba612bd1c6670433;p=libpicofe.git diff --git a/gp2x/Makefile b/gp2x/Makefile index d9c40bb..595db53 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -1,7 +1,7 @@ # you may or may not need to change this #devkit_path = x:/stuff/dev/devkitgp2x/ -CROSS = arm-linux- +export CROSS = arm-linux- #CROSS = $(devkit_path)bin/arm-linux- # settings @@ -13,6 +13,7 @@ asm_ym2612 = 1 asm_misc = 1 asm_cdpico = 1 asm_cdmemory = 1 +amalgamate = 0 #profile = 1 #use_musashi = 1 #up = 1 @@ -31,7 +32,12 @@ use_cyclone = 1 endif DEFINC = -I../.. -I. -DARM -D__GP2X__ -D_UNZIP_SUPPORT # -DBENCHMARK -COPT_COMMON = -static -Wall -O3 -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math # -s +COPT_COMMON = -static -Wall -Winline +ifeq ($(DEBUG),) +COPT_COMMON += -O2 -ftracer -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math +else +COPT_COMMON += -ggdb +endif ifeq "$(profile)" "1" COPT_COMMON += -fprofile-generate endif @@ -47,17 +53,27 @@ LD = $(CROSS)ld OBJCOPY = $(CROSS)objcopy # frontend -OBJS += main.o menu.o fonts.o gp2x.o usbjoy.o emu.o squidgehack.o asmutils.o cpuctrl.o +OBJS += main.o menu.o gp2x.o usbjoy.o emu.o squidgehack.o cpuctrl.o # 940 core control OBJS += 940ctl.o + +# common +OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/arm_utils.o \ + ../common/readpng.o ../common/mp3_helix.o + # Pico -OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Utils.o ../../Pico/Memory.o ../../Pico/Misc.o \ +ifeq "$(amalgamate)" "1" +OBJS += ../../PicoAll.o +else +OBJS += ../../Pico/Area.o ../../Pico/Cart.o ../../Pico/Memory.o ../../Pico/Misc.o \ ../../Pico/Pico.o ../../Pico/Sek.o ../../Pico/VideoPort.o ../../Pico/Draw2.o ../../Pico/Draw.o \ ../../Pico/Patch.o # Pico - CD OBJS += ../../Pico/cd/Pico.o ../../Pico/cd/Memory.o ../../Pico/cd/Sek.o ../../Pico/cd/LC89510.o \ ../../Pico/cd/cd_sys.o ../../Pico/cd/cd_file.o ../../Pico/cd/gfx_cd.o \ ../../Pico/cd/Area.o ../../Pico/cd/Misc.o ../../Pico/cd/pcm.o ../../Pico/cd/buffering.o +endif + # asm stuff ifeq "$(asm_render)" "1" DEFINC += -D_ASM_DRAW_C @@ -84,16 +100,18 @@ ifeq "$(asm_cdmemory)" "1" DEFINC += -D_ASM_CD_MEMORY_C OBJS += ../../Pico/cd/memory_asm.o endif + # Pico - sound +ifneq "$(amalgamate)" "1" +OBJS += ../../Pico/sound/sound.o +endif OBJS += ../../Pico/sound/mix_asm.o -OBJS += ../../Pico/sound/sound.o ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o +OBJS += ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o # zlib OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/inftrees.o ../../zlib/trees.o \ ../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o # unzip OBJS += ../../unzip/unzip.o ../../unzip/unzip_stream.o -# mp3 -OBJS += mp3.o # debug ifeq "$(debug_cyclone)" "1" OBJS += ../../Pico/_cyclone_debug.o ../../cpu/musashi/m68kdasm.o @@ -119,9 +137,9 @@ endif all: PicoDrive.gpe -PicoDrive.gpe : $(OBJS) helix/helix_mp3.a +PicoDrive.gpe : $(OBJS) ../common/helix/helix_mp3.a @echo $@ - @$(GCC) -o $@ $(COPT) $^ -lm -Wl,-Map=PicoDrive.map + @$(GCC) -o $@ $(COPT) $^ -lm -lpng -Wl,-Map=PicoDrive.map ifeq ($(DEBUG),) @$(STRIP) $@ endif @@ -137,7 +155,7 @@ up: PicoDrive.gpe # @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ -testrefr.gpe : test.o gp2x.o asmutils.o +testrefr.gpe : test.o gp2x.o @echo $@ @$(GCC) $(COPT) $^ -o $@ @$(STRIP) $@ @@ -164,7 +182,7 @@ testrefr.gpe : test.o gp2x.o asmutils.o ../../Pico/sound/mix_asm.o : ../../Pico/sound/mix.s @echo $< @$(AS) $(ASOPT) $< -o $@ -../../Pico/misc_asm.o : ../../Pico/misc.s +../../Pico/misc_asm.o : ../../Pico/Misc.s @echo $< @$(AS) $(ASOPT) $< -o $@ ../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s @@ -173,7 +191,7 @@ testrefr.gpe : test.o gp2x.o asmutils.o ../../Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s @echo $< @$(AS) $(ASOPT) $< -o $@ -../../Pico/cd/misc_asm.o : ../../Pico/cd/misc.s +../../Pico/cd/misc_asm.o : ../../Pico/cd/Misc.s @echo $< @$(AS) $(ASOPT) $< -o $@ @@ -187,8 +205,14 @@ testrefr.gpe : test.o gp2x.o asmutils.o # build helix libs -helix/helix_mp3.a: - make -C helix +../common/helix/helix_mp3.a: + make -C ../common/helix + +readme.txt: ../../tools/textfilter ../base_readme.txt + ../../tools/textfilter ../base_readme.txt $@ GP2X + +../../tools/textfilter: ../../tools/textfilter.c + make -C ../../tools/ textfilter # cleanup @@ -210,23 +234,10 @@ $(error need VER) endif endif -rel: PicoDrive.gpe code940/code940.bin ../readme.txt config.txt PicoDrive.man.txt PicoDrive.png +rel: PicoDrive.gpe code940/pico940.bin readme.txt PicoDrive.man.txt PicoDrive.png zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o + zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt code940/code940.bin: make -C code940/ - -# test -#usbjoy.o : usbjoy.c -# @echo $< -# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@ -# -#../../Pico/Cart.o : ../../Pico/Cart.c -# @echo $< -# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@ -# -#../../zlib/trees.o : ../../zlib/trees.c -# @echo $< -# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@ -