diff options
Diffstat (limited to 'backends/platform/ds/arm9/makefile')
-rw-r--r-- | backends/platform/ds/arm9/makefile | 76 |
1 files changed, 32 insertions, 44 deletions
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index db8e41af48..bf9fc1d826 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -1,13 +1,10 @@ srcdir ?= . DEPDIR := .deps -VERBOSE_BUILD = 0 -DYNAMIC_MODULES = 1 +#DYNAMIC_MODULES = 1 libndsdir = $(DEVKITPRO)/libnds #libndsdir = /home/neil/devkitpror21/libnds -ENABLED = DYNAMIC_PLUGIN - # Select the build by setting SCUMM_BUILD to a,b,c,d,e,f or g. # Anything else gets build a. @@ -15,7 +12,7 @@ ifeq ($(SCUMM_BUILD),k) DS_BUILD_K = 1 else ifeq ($(SCUMM_BUILD),j) - DS_BUILD_J = 1 + DS_BUILD_J = 1 else ifeq ($(SCUMM_BUILD),i) DS_BUILD_I = 1 @@ -67,7 +64,7 @@ ifdef DS_BUILD_F else ifdef DS_BUILD_E # TODO: Inherit the earth uses so much RAM that I have removed libmad in order to - # claw some back. + # claw some back. @@ -78,7 +75,7 @@ else ifdef DS_BUILD_K else - #USE_MAD = 1 + # USE_MAD = 1 endif endif endif @@ -115,7 +112,7 @@ USE_ARM_COSTUME_ASM = 1 ifdef DS_BUILD_A DEFINES = -DDS_BUILD_A -DUSE_ARM_GFX_ASM -DUSE_ARM_COSTUME_ASM LOGO = logoa.bmp - ENABLE_SCUMM = $(ENABLED) + ENABLE_SCUMM = STATIC_PLUGIN USE_ARM_GFX_ASM = 1 BUILD=scummvm-A endif @@ -123,66 +120,66 @@ endif ifdef DS_BUILD_B DEFINES = -DDS_BUILD_B LOGO = logob.bmp - ENABLE_SKY = $(ENABLED) - ENABLE_QUEEN = $(ENABLED) + ENABLE_SKY = STATIC_PLUGIN + ENABLE_QUEEN = STATIC_PLUGIN BUILD=scummvm-B endif ifdef DS_BUILD_C DEFINES = -DDS_BUILD_C LOGO = logoc.bmp - ENABLE_AGOS = $(ENABLED) + ENABLE_AGOS = STATIC_PLUGIN BUILD=scummvm-C endif ifdef DS_BUILD_D DEFINES = -DDS_BUILD_D LOGO = logod.bmp - ENABLE_GOB = $(ENABLED) - ENABLE_CINE = $(ENABLED) - ENABLE_AGI = $(ENABLED) + ENABLE_GOB = STATIC_PLUGIN + ENABLE_CINE = STATIC_PLUGIN + ENABLE_AGI = STATIC_PLUGIN BUILD=scummvm-D endif ifdef DS_BUILD_E DEFINES = -DDS_BUILD_E LOGO = logoe.bmp - ENABLE_SAGA = $(ENABLED) + ENABLE_SAGA = STATIC_PLUGIN BUILD=scummvm-E endif ifdef DS_BUILD_F DEFINES = -DDS_BUILD_F LOGO = logof.bmp - ENABLE_KYRA = $(ENABLED) + ENABLE_KYRA = STATIC_PLUGIN BUILD=scummvm-F endif ifdef DS_BUILD_G DEFINES = -DDS_BUILD_G LOGO = logog.bmp - ENABLE_LURE = $(ENABLED) + ENABLE_LURE = STATIC_PLUGIN BUILD=scummvm-G endif ifdef DS_BUILD_H DEFINES = -DDS_BUILD_H LOGO = logoh.bmp - ENABLE_PARALLACTION = $(ENABLED) + ENABLE_PARALLACTION = STATIC_PLUGIN BUILD=scummvm-H endif ifdef DS_BUILD_I DEFINES = -DDS_BUILD_I LOGO = logoi.bmp - ENABLE_MADE = $(ENABLED) + ENABLE_MADE = STATIC_PLUGIN BUILD=scummvm-I endif ifdef DS_BUILD_K DEFINES = -DDS_BUILD_K LOGO = logok.bmp - ENABLE_CRUISE = $(ENABLED) + ENABLE_CRUISE = STATIC_PLUGIN BUILD=scummvm-K endif @@ -190,18 +187,18 @@ endif #ifdef DS_BUILD_L # DEFINES = -DDS_BUILD_L # LOGO = logog.bmp -# ENABLE_DRASCULA = $(ENABLED) +# ENABLE_DRASCULA = STATIC_PLUGIN # BUILD=scummvm-K #endif #ifdef DS_BUILD_M # DEFINES = -DDS_BUILD_M # LOGO = logog.bmp -# ENABLE_TUCKER = $(ENABLED) +# ENABLE_TUCKER = STATIC_PLUGIN # BUILD=scummvm-K #endif -ARM7BIN := -7 $(CURDIR)/../arm7/arm7.bin +ARM7BIN := -7 $(CURDIR)/../../arm7/arm7.bin CC = arm-eabi-gcc CXX = arm-eabi-g++ @@ -239,14 +236,14 @@ CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder \ ASFLAGS = -mcpu=arm9tdmi -mthumb-interwork -DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DUSE_ELF_LOADER -DARM -DARM_TARGET -DONE_PLUGIN_AT_A_TIME +DEFINES += -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_TEXT_CONSOLE -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DARM ifdef USE_MAD DEFINES += -DUSE_MAD endif DEFINES += -DREDUCE_MEMORY_USAGE -LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,--target1-abs,-Map,map.txt#-Wl,--gc-sections +LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections ifdef WRAP_MALLOC LDFLAGS += -Wl,--wrap,malloc @@ -255,11 +252,12 @@ endif BACKEND := ds -INCLUDES= -I$(portdir) -I$(srcdir) -I$(srcdir)/engines \ +INCLUDES= -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/engines \ -I$(portdir)/data -I$(portdir)/../commoninclude \ -I$(portdir)/source -I$(portdir)/source/mad \ -I$(libndsdir)/include -include $(srcdir)/common/scummsys.h + LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9 ifdef USE_MAD LIBS += -lmad @@ -268,19 +266,7 @@ ifdef USE_DEBUGGER LIBS += -ldsdebugger -ldswifi9 endif -ifeq ($(DYNAMIC_MODULES),1) -DEFINES += -DDYNAMIC_MODULES -PRE_OBJS_FLAGS = -Wl,--whole-archive -POST_OBJS_FLAGS = -Wl,--no-whole-archive -endif - EXECUTABLE = scummvm.elf - -PLUGIN_PREFIX = -PLUGIN_SUFFIX = .plg -PLUGIN_EXTRA_DEPS = $(srcdir)/backends/plugins/ds/plugin.ld $(srcdir)/backends/plugins/elf/plugin.syms $(EXECUTABLE) -PLUGIN_LDFLAGS += -nostartfiles -Wl,-q,--target1-abs,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ds/plugin.ld,--retain-symbols-file,$(srcdir)/backends/plugins/elf/plugin.syms -lstdc++ -lc -mthumb-interwork -mno-fpu#-Wl,--gc-sections -mno-crt0 $(DEVKITPRO)/devkitARM/arm-eabi/lib/ds_arm9_crt0.o - MKDIR = mkdir -p RM = rm -f RM_REC = rm -rf @@ -354,22 +340,25 @@ OPT_SIZE := -Os -mthumb OBJS := $(DATA_OBJS) $(PORT_OBJS) $(FAT_OBJS) + MODULE_DIRS += . -ndsall: plugins - make -f makefile scummvm.nds scummvm.ds.gba +ndsall: + @[ -d $(BUILD) ] || mkdir -p $(BUILD) + make -C ./$(BUILD) -f ../makefile scummvm.nds scummvm.ds.gba include $(srcdir)/Makefile.common semiclean: $(RM) $(portdir)/source/dsoptions.o $(portdir)/source/dsmain.o $(FAT_OBJS) $(DATA_OBJS) $(portdir)/source/wordcompletion.o $(portdir)/source/dsoptions.o -clean: #TODO: Manual removal of engine, plugins, etc. isn't very elegant! +clean: $(RM) $(OBJS) $(EXECUTABLE) - rm -rf *.h engines plugins graphics gui common sound backends base map.txt scummvm.nds scummvm.ds.gba + rm -fr $(BUILD) dist : SCUMMVM.BIN plugins plugin_dist + #--------------------------------------------------------------------------------- # canned command sequence for binary data #--------------------------------------------------------------------------------- @@ -411,14 +400,13 @@ endef #--------------------------------------------------------------------------------- %.nds: %.bin - ndstool -c $@ -9 $< $(ARM7BIN) -b ../$(LOGO) "$(@F);ScummVM $(VERSION);DS Port" + ndstool -c $@ -9 $< $(ARM7BIN) -b ../../$(LOGO) "$(@F);ScummVM $(VERSION);DS Port" %.ds.gba: %.nds dsbuild $< -o $@ -l $(portdir)/ndsloader.bin padbin 16 $@ #--------------------------------------------------------------------------------- - %.bin: %.elf $(OBJCOPY) -S -O binary $< $@ |