X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2FMakefile;h=d9c40bb3d8176b0216e6571bfdb6adadc549d0d7;hb=0ae6813e481cdbb7a661b49dba612bd1c6670433;hp=78187416039a0b076e97ae7a036d39fd9fc5e6a4;hpb=dfa4c846f44d3717288758b38d267d157858aaf7;p=libpicofe.git diff --git a/gp2x/Makefile b/gp2x/Makefile index 7818741..d9c40bb 100644 --- a/gp2x/Makefile +++ b/gp2x/Makefile @@ -5,7 +5,6 @@ CROSS = arm-linux- #CROSS = $(devkit_path)bin/arm-linux- # settings -dprint = 1 #mz80 = 1 #debug_cyclone = 1 asm_memory = 1 @@ -13,12 +12,26 @@ asm_render = 1 asm_ym2612 = 1 asm_misc = 1 asm_cdpico = 1 +asm_cdmemory = 1 #profile = 1 #use_musashi = 1 #up = 1 + +ifeq "$(debug_cyclone)" "1" +use_cyclone = 1 +use_musashi = 1 +endif +ifeq "$(use_musashi)" "1" +asm_cdpico = 0 +asm_memory = 0 +asm_cdmemory = 0 +else +use_cyclone = 1 +endif + DEFINC = -I../.. -I. -DARM -D__GP2X__ -D_UNZIP_SUPPORT # -DBENCHMARK -COPT_COMMON = -static -O3 -ftracer -fstrength-reduce -Wall -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math # -s +COPT_COMMON = -static -Wall -O3 -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math # -s ifeq "$(profile)" "1" COPT_COMMON += -fprofile-generate endif @@ -61,11 +74,16 @@ endif ifeq "$(asm_misc)" "1" DEFINC += -D_ASM_MISC_C OBJS += ../../Pico/misc_asm.o +OBJS += ../../Pico/cd/misc_asm.o endif ifeq "$(asm_cdpico)" "1" DEFINC += -D_ASM_CD_PICO_C OBJS += ../../Pico/cd/pico_asm.o endif +ifeq "$(asm_cdmemory)" "1" +DEFINC += -D_ASM_CD_MEMORY_C +OBJS += ../../Pico/cd/memory_asm.o +endif # Pico - sound OBJS += ../../Pico/sound/mix_asm.o OBJS += ../../Pico/sound/sound.o ../../Pico/sound/sn76496.o ../../Pico/sound/ym2612.o @@ -76,11 +94,16 @@ OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/i 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 +endif # CPU cores ifeq "$(use_musashi)" "1" DEFINC += -DEMU_M68K -OBJS += _build\m68kcpu.o _build\m68kopac.o _build\m68kopdm.o _build\m68kopnz.o _build\m68kops.o -else +OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o +endif +ifeq "$(use_cyclone)" "1" DEFINC += -DEMU_C68K OBJS += ../../cpu/Cyclone/proj/Cyclone.o endif @@ -109,7 +132,7 @@ ifeq "$(up)" "1" endif up: PicoDrive.gpe - @cp -v PicoDrive.gpe /mnt/gp2x/mnt/sd/games/PicoDrive/ + @cp -v PicoDrive.gpe /mnt/gp2x/mnt/sd/emus/PicoDrive/ # @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\ @@ -147,11 +170,21 @@ testrefr.gpe : test.o gp2x.o asmutils.o ../../Pico/cd/pico_asm.o : ../../Pico/cd/Pico.s @echo $< @$(AS) $(ASOPT) $< -o $@ +../../Pico/cd/memory_asm.o : ../../Pico/cd/Memory.s + @echo $< + @$(AS) $(ASOPT) $< -o $@ +../../Pico/cd/misc_asm.o : ../../Pico/cd/misc.s + @echo $< + @$(AS) $(ASOPT) $< -o $@ # build Cyclone ../../cpu/Cyclone/proj/Cyclone.s : @echo building Cyclone... - @make -C ../../cpu/Cyclone/proj -f Makefile.linux + @make -C ../../cpu/Cyclone/proj CONFIG_FILE=config_pico.h + +../../cpu/musashi/m68kops.c : + @make -C ../../cpu/musashi + # build helix libs helix/helix_mp3.a: @@ -177,7 +210,7 @@ $(error need VER) endif endif -rel: PicoDrive.gpe code940/code940.bin ../readme.txt config.txt +rel: PicoDrive.gpe code940/code940.bin ../readme.txt config.txt PicoDrive.man.txt PicoDrive.png zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o code940/code940.bin: @@ -185,15 +218,15 @@ code940/code940.bin: # 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 $@ +#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 $@