Makefile: add arm9/arm7 rules

This commit is contained in:
Zack Buhman 2024-09-02 23:02:38 -05:00
parent 04cfb2ea0e
commit c0395c9a7e
2 changed files with 16 additions and 3 deletions

View File

@ -7,6 +7,12 @@ OBJ = \
all: cartridge.bin
arm9/arm9.bin:
make -C arm9/
arm7/arm7.bin:
make -C arm7/
cartridge.elf: $(OBJ)
TARGET = arm-none-eabi-
@ -14,3 +20,5 @@ AARCH = -march=armv4t -mlittle-endian
OBJARCH = -O elf32-littlearm -B armv4t
LDSCRIPT = cartridge.lds
include common.mk
.PHONY: arm9/arm9.bin arm7/arm7.bin

View File

@ -17,23 +17,28 @@ SECTIONS
. = 0x02000000;
_arm9 = .;
.text.arm9 ALIGN(4) :
{
KEEP(arm9/arm9.bin.o(*))
KEEP(*(.data.arm9/arm9.bin))
} AT>rom
. = 0x02000000 + 0x8000;
_arm7 = .;
.text.arm7 ALIGN(4) :
{
KEEP(arm7/arm7.bin.o(*))
KEEP(*(.data.arm7/arm7.bin))
} AT>rom
/DISCARD/ :
{
*(.glue_7) *(.glue_7t) *(.vfp11_veneer) *(.v4_bx)
*(.ARM.attributes) *(.iplt) *(.rel.iplt) *(.igot.plt)
}
INCLUDE "debug.lds"
}
/* header symbols */