(Wii) link nxengine correctly in distscript

This commit is contained in:
ToadKing 2013-02-05 19:29:27 -05:00
parent bdd67f1a3f
commit 94c2f13b35
2 changed files with 12 additions and 2 deletions

View File

@ -8,6 +8,7 @@ HAVE_LOGGER = 0
HAVE_FILE_LOGGER = 0
PERF_TEST = 0
HAVE_WIIUSE_MOD = 0
WHOLE_ARCHIVE_LINK = 0
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.100"
PC_DEVELOPMENT_UDP_PORT = 3490
@ -42,8 +43,12 @@ LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
WHOLE_START := -Wl,--whole-archive
WHOLE_END := -Wl,--no-whole-archive
endif
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size -T gx/ld/rvl.ld
LIBS := -lfat -lretro_wii -logc $(LDFLAGS_WIIUSE) -lbte
LIBS := -lfat $(WHOLE_START) -lretro_wii $(WHOLE_END) -logc $(LDFLAGS_WIIUSE) -lbte
APP_BOOTER_DIR = wii/app_booter
OBJ = console/griffin/griffin.o $(APP_BOOTER_DIR)/app_booter.binobj

View File

@ -8,8 +8,13 @@ make -C ../ -f Makefile.wii.salamander pkg || exit 1
for f in *_wii.a ; do
name=`echo "$f" | sed 's/\(_libretro\|\)_wii.a$//'`
whole_archive=
if [ $name = "nxengine" ] ; then
whole_archive="WHOLE_ARCHIVE_LINK=1"
echo $name yes
fi
cp -f "$f" ../libretro_wii.a
make -C ../ -f Makefile.wii -j3 || exit 1
make -C ../ -f Makefile.wii $whole_archive -j3 || exit 1
mv -f ../retroarch_wii.dol ../wii/pkg/$name.dol
rm -f ../retroarch_wii.dol ../retroarch_wii.elf ../retroarch_wii.elf.map
done