X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=8e2feee1170ab30f660f918b9d1476414bc041bb;hb=341af486f5620570dd21519a811f79a1c51bd5c3;hp=d094104cc08ce4c06c7b3255abcf523e93205ed3;hpb=89dbbf2b2fe885c9f443178c1f1350567e92160b;p=picodrive.git diff --git a/Makefile b/Makefile index d094104..8e2feee 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,10 @@ TARGET ?= PicoDrive CFLAGS += -Wall -ggdb -falign-functions=2 CFLAGS += -I. ifndef DEBUG -CFLAGS += -O2 -DNDEBUG +CFLAGS += -O2 -DNDEBUG -ffunction-sections +ifeq ($(findstring clang,$(CC)),) +LDFLAGS += -Wl,--gc-sections +endif endif #CFLAGS += -DEVT_LOG #CFLAGS += -DDRC_CMP @@ -45,7 +48,6 @@ asm_mix ?= 1 else # if not arm use_fame ?= 1 use_cz80 ?= 1 -use_sh2mame ?= 1 endif -include Makefile.local @@ -56,7 +58,21 @@ asm_cdpico = 0 asm_cdmemory = 0 endif -# frontend +ifeq "$(PLATFORM)" "opendingux" +opk: $(TARGET).opk + +$(TARGET).opk: $(TARGET) + $(RM) -rf .opk_data + cp -r platform/opendingux/data .opk_data + cp $< .opk_data/PicoDrive + $(STRIP) .opk_data/PicoDrive + mksquashfs .opk_data $@ -all-root -noappend -no-exports -no-xattrs + +OBJS += platform/opendingux/inputmap.o + +# OpenDingux is a generic platform, really. +PLATFORM := generic +endif ifeq "$(PLATFORM)" "generic" OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME OBJS += platform/common/plat_sdl.o @@ -66,6 +82,7 @@ USE_FRONTEND = 1 endif ifeq "$(PLATFORM)" "pandora" platform/common/menu_pico.o: CFLAGS += -DPANDORA +platform/libpicofe/linux/plat.o: CFLAGS += -DPANDORA OBJS += platform/pandora/plat.o OBJS += platform/pandora/asm_utils.o OBJS += platform/common/arm_utils.o @@ -156,6 +173,7 @@ target_: $(TARGET) clean: $(RM) $(TARGET) $(OBJS) + $(RM) -r .opk_data $(TARGET): $(OBJS) $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS) @@ -179,36 +197,14 @@ pico/cd/pcm.o: CFLAGS += -fno-strict-aliasing pico/cd/LC89510.o: CFLAGS += -fno-strict-aliasing pico/cd/gfx_cd.o: CFLAGS += -fno-strict-aliasing +# fame needs ~2GB of RAM to compile on gcc 4.8 +# on x86, this is reduced by ~300MB when debug info is off (but not on ARM) +cpu/fame/famec.o: CFLAGS += -g0 + # 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/mcd.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 +pico/memory.o pico/cd/memory.o pico/32x/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 | \ - sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g') - -ifeq "$(PLATFORM)" "pandora" - -PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh - -/tmp/readme.txt: tools/textfilter platform/base_readme.txt - tools/textfilter platform/base_readme.txt $@ PANDORA - -/tmp/PicoDrive.pxml: platform/pandora/PicoDrive.pxml.template - platform/pandora/make_pxml.sh $^ $@ - -rel: PicoDrive platform/pandora/PicoDrive.run platform/pandora/picorestore \ - pico/carthw.cfg /tmp/readme.txt platform/pandora/skin \ - platform/pandora/PicoDrive.png platform/pandora/PicoDrive_p.png \ - /tmp/PicoDrive.pxml - rm -rf out - mkdir out - cp -r $^ out/ - $(PND_MAKE) -p PicoDrive_$(VER).pnd -d out -x out/PicoDrive.pxml -i out/PicoDrive.png -c - -endif