X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=db145a5b529bee16bdd7c6928a06e7d9ca251083;hb=3b7088981e85f80156199530fc810bba63d0ba7a;hp=71e6a03ac43f78e1ea4055c470b75aad06ec6db5;hpb=2446536be520914616403876d7e49621ac6f4b95;p=picodrive.git diff --git a/Makefile b/Makefile index 71e6a03..db145a5 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ TARGET ?= PicoDrive CFLAGS += -Wall -ggdb -falign-functions=2 CFLAGS += -I. -# FIXME -CFLAGS += -Iplatform/linux/ ifndef DEBUG CFLAGS += -O2 -DNDEBUG endif +#CFLAGS += -DEVT_LOG +#CFLAGS += -DDRC_CMP +#drc_debug = 4 +#profile = 1 + all: config.mak target_ @@ -29,31 +32,24 @@ ifeq "$(ARCH)" "arm" use_cyclone ?= 1 use_drz80 ?= 1 use_sh2drc ?= 1 - -asm_memory = 1 -asm_render = 1 -asm_ym2612 = 1 -asm_misc = 1 -asm_cdpico = 1 -asm_cdmemory = 1 +use_svpdrc ?= 1 + +asm_memory ?= 1 +asm_render ?= 1 +asm_ym2612 ?= 1 +asm_misc ?= 1 +asm_cdpico ?= 1 +asm_cdmemory ?= 1 +asm_mix ?= 1 else # if not arm -ifneq "$(ARCH)" "x86_64" -# no 64bit support use_fame ?= 1 -else -use_musashi ?= 1 -endif use_cz80 ?= 1 use_sh2mame ?= 1 endif -#drc_debug = 3 -#drc_debug_interp = 1 -#profile = 1 - -include Makefile.local -ifeq "$(use_musashi)" "1" +ifneq "$(use_cyclone)" "1" # due to CPU stop flag access asm_cdpico = 0 asm_cdmemory = 0 @@ -113,7 +109,12 @@ endif endif # USE_FRONTEND +OBJS += platform/common/mp3.o +ifeq "$(HAVE_LIBAVCODEC)" "1" +OBJS += platform/common/mp3_libavcodec.o +else OBJS += platform/common/mp3_dummy.o +endif # zlib OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \ @@ -124,17 +125,39 @@ OBJS += unzip/unzip.o unzip/unzip_stream.o include platform/common/common.mak +OBJS += $(OBJS_COMMON) +CFLAGS += $(addprefix -D,$(DEFINES)) + +ifneq ($(findstring gcc,$(CC)),) +LDFLAGS += -Wl,-Map=$(TARGET).map +endif + + target_: $(TARGET) clean: $(RM) $(TARGET) $(OBJS) $(TARGET): $(OBJS) - $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) -Wl,-Map=$(TARGET).map + $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) pprof: platform/linux/pprof.c $(CC) -O2 -ggdb -DPPROF -DPPROF_TOOL -I../../ -I. $^ -o $@ +tools/textfilter: tools/textfilter.c + make -C tools/ textfilter + +.s.o: + $(CC) $(CFLAGS) -c $< -o $@ + +# random deps +pico/carthw/svp/compiler.o : cpu/drc/emit_$(ARCH).c +cpu/sh2/compiler.o : cpu/drc/emit_$(ARCH).c +cpu/sh2/mame/sh2pico.o : cpu/sh2/mame/sh2.c +pico/pico.o pico/cd/pico.o pico/32x/32x.o : pico/pico_cmn.c pico/pico_int.h +pico/memory.o pico/cd/memory.o : pico/pico_int.h pico/memory.h +cpu/fame/famec.o: cpu/fame/famec.c cpu/fame/famec_opcodes.h + # ----------- release ----------- VER ?= $(shell head -n 1 platform/common/version.h | \