Update Makefile with help from devkitPro maintainers

This commit is contained in:
Diegoisawesome 2018-05-22 16:05:56 -05:00
parent de60bdf2fe
commit 489f90b832
3 changed files with 64 additions and 69 deletions

View File

@ -1,3 +1,7 @@
include $(DEVKITARM)/base_tools
export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
SHELL := /bin/bash -o pipefail SHELL := /bin/bash -o pipefail
ROM := pokeemerald.gba ROM := pokeemerald.gba
@ -16,25 +20,16 @@ ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR) DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR) SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
AS := $(DEVKITARM)/bin/arm-none-eabi-as
ASFLAGS := -mcpu=arm7tdmi ASFLAGS := -mcpu=arm7tdmi
CC1 := tools/agbcc/bin/agbcc CC1 := tools/agbcc/bin/agbcc
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp
CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
LDFLAGS = -Map ../../$(MAP) LDFLAGS = -Map ../../$(MAP)
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy LIB := -L ../../tools/agbcc/lib -lgcc -lc
ifeq ($(OS),Windows_NT)
LIB := ../../tools/agbcc/lib/libgcc.a ../../tools/agbcc/lib/libc.a
else
LIB := -L ../../tools/agbcc/lib -lgcc -lc
endif
SHA1 := sha1sum -c SHA1 := sha1sum -c

View File

@ -31,7 +31,7 @@ SECTIONS {
/* COMMON starts at 0x30022A8 */ /* COMMON starts at 0x30022A8 */
<COMMON> <COMMON>
tools/agbcc/lib/libc.a:sbrkr.o(COMMON); *libc.a:sbrkr.o(COMMON);
end = .; end = .;
. = 0x8000; . = 0x8000;
} }
@ -303,56 +303,56 @@ SECTIONS {
src/librfu_rfu.o(.text); src/librfu_rfu.o(.text);
asm/librfu.o(.text); asm/librfu.o(.text);
asm/libagbsyscall.o(.text); asm/libagbsyscall.o(.text);
tools/agbcc/lib/libgcc.a:_call_via_rX.o(.text); *libgcc.a:_call_via_rX.o(.text);
tools/agbcc/lib/libgcc.a:_divdi3.o(.text); *libgcc.a:_divdi3.o(.text);
tools/agbcc/lib/libgcc.a:_divsi3.o(.text); *libgcc.a:_divsi3.o(.text);
tools/agbcc/lib/libgcc.a:_dvmd_tls.o(.text); *libgcc.a:_dvmd_tls.o(.text);
tools/agbcc/lib/libgcc.a:_fixunsdfsi.o(.text); *libgcc.a:_fixunsdfsi.o(.text);
tools/agbcc/lib/libgcc.a:_fixunssfsi.o(.text); *libgcc.a:_fixunssfsi.o(.text);
tools/agbcc/lib/libgcc.a:_modsi3.o(.text); *libgcc.a:_modsi3.o(.text);
tools/agbcc/lib/libgcc.a:_muldi3.o(.text); *libgcc.a:_muldi3.o(.text);
tools/agbcc/lib/libgcc.a:_udivdi3.o(.text); *libgcc.a:_udivdi3.o(.text);
tools/agbcc/lib/libgcc.a:_udivsi3.o(.text); *libgcc.a:_udivsi3.o(.text);
tools/agbcc/lib/libgcc.a:_umodsi3.o(.text); *libgcc.a:_umodsi3.o(.text);
tools/agbcc/lib/libgcc.a:dp-bit.o(.text); *libgcc.a:dp-bit.o(.text);
tools/agbcc/lib/libgcc.a:fp-bit.o(.text); *libgcc.a:fp-bit.o(.text);
tools/agbcc/lib/libgcc.a:_lshrdi3.o(.text); *libgcc.a:_lshrdi3.o(.text);
tools/agbcc/lib/libgcc.a:_negdi2.o(.text); *libgcc.a:_negdi2.o(.text);
tools/agbcc/lib/libc.a:memcpy.o(.text); *libc.a:memcpy.o(.text);
tools/agbcc/lib/libc.a:memset.o(.text); *libc.a:memset.o(.text);
tools/agbcc/lib/libc.a:strcmp.o(.text); *libc.a:strcmp.o(.text);
tools/agbcc/lib/libc.a:strcpy.o(.text); *libc.a:strcpy.o(.text);
tools/agbcc/lib/libc.a:vfprintf.o(.text); *libc.a:vfprintf.o(.text);
tools/agbcc/lib/libc.a:vsprintf.o(.text); *libc.a:vsprintf.o(.text);
tools/agbcc/lib/libc.a:fvwrite.o(.text); *libc.a:fvwrite.o(.text);
tools/agbcc/lib/libc.a:locale.o(.text); *libc.a:locale.o(.text);
tools/agbcc/lib/libc.a:findfp.o(.text); *libc.a:findfp.o(.text);
tools/agbcc/lib/libc.a:fflush.o(.text); *libc.a:fflush.o(.text);
tools/agbcc/lib/libc.a:wsetup.o(.text); *libc.a:wsetup.o(.text);
tools/agbcc/lib/libc.a:mbtowc_r.o(.text); *libc.a:mbtowc_r.o(.text);
tools/agbcc/lib/libc.a:s_isinf.o(.text); *libc.a:s_isinf.o(.text);
tools/agbcc/lib/libc.a:s_isnan.o(.text); *libc.a:s_isnan.o(.text);
tools/agbcc/lib/libc.a:memchr.o(.text); *libc.a:memchr.o(.text);
tools/agbcc/lib/libc.a:strlen.o(.text); *libc.a:strlen.o(.text);
tools/agbcc/lib/libc.a:dtoa.o(.text); *libc.a:dtoa.o(.text);
tools/agbcc/lib/libc.a:memmove.o(.text); *libc.a:memmove.o(.text);
tools/agbcc/lib/libc.a:stdio.o(.text); *libc.a:stdio.o(.text);
tools/agbcc/lib/libc.a:mprec.o(.text); *libc.a:mprec.o(.text);
tools/agbcc/lib/libc.a:mallocr.o(.text); *libc.a:mallocr.o(.text);
tools/agbcc/lib/libc.a:fwalk.o(.text); *libc.a:fwalk.o(.text);
tools/agbcc/lib/libc.a:freer.o(.text); *libc.a:freer.o(.text);
tools/agbcc/lib/libc.a:makebuf.o(.text); *libc.a:makebuf.o(.text);
tools/agbcc/lib/libc.a:readr.o(.text); *libc.a:readr.o(.text);
tools/agbcc/lib/libc.a:writer.o(.text); *libc.a:writer.o(.text);
tools/agbcc/lib/libc.a:lseekr.o(.text); *libc.a:lseekr.o(.text);
tools/agbcc/lib/libc.a:closer.o(.text); *libc.a:closer.o(.text);
tools/agbcc/lib/libc.a:callocr.o(.text); *libc.a:callocr.o(.text);
tools/agbcc/lib/libc.a:sbrkr.o(.text); *libc.a:sbrkr.o(.text);
tools/agbcc/lib/libc.a:mlock.o(.text); *libc.a:mlock.o(.text);
tools/agbcc/lib/libc.a:fstatr.o(.text); *libc.a:fstatr.o(.text);
tools/agbcc/lib/libc.a:libcfunc.o(.text); *libc.a:libcfunc.o(.text);
tools/agbcc/lib/libc.a:syscalls.o(.text); *libc.a:syscalls.o(.text);
tools/agbcc/lib/libc.a:errno.o(.text); *libc.a:errno.o(.text);
src/libisagbprn.o(.text); src/libisagbprn.o(.text);
} =0 } =0
@ -1091,11 +1091,11 @@ SECTIONS {
src/agb_flash_le.o(.rodata); src/agb_flash_le.o(.rodata);
src/siirtc.o(.rodata); src/siirtc.o(.rodata);
data/librfu_rodata.o(.rodata); data/librfu_rodata.o(.rodata);
tools/agbcc/lib/libgcc.a:_divdi3.o(.rodata); *libgcc.a:_divdi3.o(.rodata);
tools/agbcc/lib/libgcc.a:_udivdi3.o(.rodata); *libgcc.a:_udivdi3.o(.rodata);
tools/agbcc/lib/libc.a(.rodata); *libc.a(.rodata);
tools/agbcc/lib/libc.a(.data); *libc.a(.data);
tools/agbcc/lib/libc.a:syscalls.o(.rodata); *libc.a:syscalls.o(.rodata);
src/libisagbprn.o(.rodata); src/libisagbprn.o(.rodata);
} =0 } =0

View File

@ -186,6 +186,6 @@ gMPlayTrack_SE3: @ 3001A20
.include "src/agb_flash.o" .include "src/agb_flash.o"
.include "src/siirtc.o" .include "src/siirtc.o"
.include "tools/agbcc/lib/libgcc.a:dp-bit.o" .include "*libgcc.a:dp-bit.o"
.include "tools/agbcc/lib/libgcc.a:fp-bit.o" .include "*libgcc.a:fp-bit.o"
.include "tools/agbcc/lib/libc.a:syscalls.o" .include "*libc.a:syscalls.o"