wut/rules/rpl.mk
James Benton 8aa77c9ee6 Add a part of libgcc to get 64 bit integer division function __udivdi3.
We cannot link with devkitPPC libgcc because it includes __eabi which we
do not want, as that sets up r2 and r13 SDA registers from elf file symbols
but that is done by the RPL FileInfo read by CafeOS for the Wii U.

In future we should probably fork devkitPPC to build without powerpc eabi
in order to match what we expect for the Wii U.
2016-06-08 01:24:37 +01:00

12 lines
451 B
Makefile

LIBPATHS := -L$(WUT_ROOT)/lib
CFLAGS := -I$(WUT_ROOT)/include -fno-builtin -ffreestanding
CXXFLAGS := $(CFLAGS)
LDFLAGS := -nostdlib -nostartfiles $(WUT_ROOT)/lib/crt0.o $(WUT_ROOT)/lib/libgcc2.o -T $(WUT_ROOT)/rules/rpl.ld -pie -fPIE -z common-page-size=64 -z max-page-size=64 -lcoreinit
ELF2RPL := $(WUT_ROOT)/bin/elf2rpl
include $(WUT_ROOT)/rules/base.mk
%.rpx: %.elf
@echo "[RPX] $(notdir $@)"
@$(ELF2RPL) $(BUILDDIR)/$(notdir $<) $@