X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=platform%2Flinux%2FMakefile;h=90a149c67beb0b37616e6bd7af38d946b608dcc8;hb=80db44425aa5b46185fb9a64520f4b6f5d494ba5;hp=a85ef43b908fbcfabff69a857d3538205371bec0;hpb=eff55556cff77fd64cff4be32e449e0a58aed6fe;p=picodrive.git diff --git a/platform/linux/Makefile b/platform/linux/Makefile index a85ef43..90a149c 100644 --- a/platform/linux/Makefile +++ b/platform/linux/Makefile @@ -1,10 +1,12 @@ # settings -dprint = 1 +#use_musashi = 1 +#use_mz80 = 1 + # profile = 1 -DEFINC = -I../.. -I. -D__GP2X__ -D_UNZIP_SUPPORT # -DBENCHMARK +DEFINC = -I../.. -I. -D__GP2X__ -D_UNZIP_SUPPORT -DIO_STATS # -DBENCHMARK GCC = gcc STRIP = strip AS = gcc @@ -24,8 +26,12 @@ COPT += `pkg-config --cflags gthread-2.0` LDFLAGS += `pkg-config --libs gthread-2.0` # frontend -OBJS += ../gp2x/main.o ../gp2x/menu.o ../gp2x/fonts.o ../gp2x/emu.o ../gp2x/usbjoy.o blit.o \ - gp2x.o 940ctl_ym2612.o ../gp2x/readpng.o +OBJS += ../gp2x/main.o ../gp2x/menu.o ../gp2x/emu.o ../gp2x/usbjoy.o blit.o \ + gp2x.o 940ctl_ym2612.o log_io.o + +# common +OBJS += ../common/emu.o ../common/menu.o ../common/fonts.o ../common/readpng.o ../common/mp3_helix.o + # Pico 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 \ @@ -41,20 +47,26 @@ OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/i ../../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 += ../gp2x/mp3.o # CPU cores +ifeq "$(use_musashi)" "1" DEFINC += -DEMU_M68K OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o -# mz80 -DEFINC += -D_USE_MZ80 +else +DEFINC += -DEMU_F68K +OBJS += ../../cpu/fame/famec.o +endif +# z80 +ifeq "$(use_mz80)" "1" +CFLAGS += -D_USE_MZ80 OBJS += ../../cpu/mz80/mz80.o +else +CFLAGS += -D_USE_CZ80 +OBJS += ../../cpu/cz80/cz80.o +endif # faked asm #DEFINC += -D_ASM_DRAW_C -#DEFINC += -D_ASM_MEMORY_C -#DEFINC += -D_ASM_YM2612_C -OBJS += fakedasm.o +#OBJS += fakedasm.o all: PicoDrive @@ -63,13 +75,16 @@ clean: tidy tidy: @$(RM) $(OBJS) @make -C ../../cpu/mz80/ clean - @make -C ../gp2x/helix/ X86=1 clean + @make -C ../common/helix/ X86=1 clean -PicoDrive : $(OBJS) ../gp2x/helix/helix_mp3_x86.a +PicoDrive : $(OBJS) ../common/helix/helix_mp3_x86.a @echo $@ @$(GCC) $(COPT) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=PicoDrive.map -o $@ +../../cpu/musashi/m68kops.c : + @make -C ../../cpu/musashi + ../../cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm @echo $@ @nasm -f elf $< -o $@ @@ -77,8 +92,8 @@ PicoDrive : $(OBJS) ../gp2x/helix/helix_mp3_x86.a ../../cpu/mz80/mz80.asm : @make -C ../../cpu/mz80/ -../gp2x/helix/helix_mp3_x86.a: - @make -C ../gp2x/helix/ X86=1 clean all +../common/helix/helix_mp3_x86.a: + @make -C ../common/helix/ X86=1 clean all .c.o: @echo $< @@ -92,8 +107,7 @@ PicoDrive : $(OBJS) ../gp2x/helix/helix_mp3_x86.a @echo $@ @$(GCC) $(COPT_COMMON) $(DEFINC) -c $< -o $@ # -mtune=arm940t -DEXTERNAL_YM2612 -# faked asm -../../Pico/Draw.o : ../../Pico/Draw.c +../../cpu/fame/famec.o : ../../cpu/fame/famec.c @echo $< - @$(GCC) $(COPT) $(DEFINC) -D_ASM_DRAW_C -c $< -o $@ + @$(GCC) $(COPT) $(DEFINC) -Wno-unused -c $< -o $@