diff options
-rwxr-xr-x | build-ds.sh | 26 | ||||
-rwxr-xr-x | configure | 6 |
2 files changed, 30 insertions, 2 deletions
diff --git a/build-ds.sh b/build-ds.sh new file mode 100755 index 0000000000..d56af5a092 --- /dev/null +++ b/build-ds.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# build-ds.sh -- script for building a ds build with every usable dynamic engine plugin + +make clean + +#Set up a static build with only engines usable by DS enabled +./configure --host=ds --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-agos --enable-gob --enable-cine --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise + +make clean + +make + +#Dump all symbols used in this garbage-collected static build into a file +rm -f ds.syms +arm-eabi-objdump -t scummvm.elf > ds.syms + +make clean + +#Set up a dynamic build with only engines usable by the DS enabled +./configure --host=ds --enable-plugins --default-dynamic --disable-debug --disable-all-engines --enable-scumm --enable-sky --enable-queen --enable-gob --enable-cine --enable-agos --enable-agi --enable-kyra --enable-lure --enable-parallaction --enable-made --enable-cruise + +make clean + +#Make this final build, which is selectively stripped with the assistance of the ds.syms file that was generated earlier +make @@ -1401,7 +1401,9 @@ case $_host_os in LDFLAGS="$LDFLAGS -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt" if test "$_dynamic_modules" = no ; then LDFLAGS="$LDFLAGS -Wl,--gc-sections" - fi + else + LDFLAGS="$LDFLAGS -Wl,--retain-symbols-file,ds.syms" + fi LDFLAGS="$LDFLAGS -L$DEVKITPRO/libnds/lib" LIBS="$LIBS -lnds9" ;; @@ -1943,7 +1945,7 @@ PLUGIN_PREFIX := PLUGIN_SUFFIX := .plg PLUGIN_EXTRA_DEPS = $(EXECUTABLE) CXXFLAGS += -DDYNAMIC_MODULES -PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--target1-abs,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ds/plugin.ld,--retain-symbols-file,$(srcdir)/backends/plugins/plugin.syms -lstdc++ -lc -mthumb-interwork -mno-fpu +PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),-T$(srcdir)/backends/plugins/ds/plugin.ld -lstdc++ -lc -mthumb-interwork -mno-fpu -Wl,--retain-symbols-file,$(srcdir)/backends/plugins/plugin.syms PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--no-whole-archive ' |