mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
* Split up the ARM9 code (.text, .vectors) and data (.rodata, .data, .bss) sections into their own ELFs. This allows us to use more ARM9 WRAM while leaving the 128k BootROM mirror intact. * use the makefile definition * Also dump section headers on .dis file
24 lines
812 B
Makefile
24 lines
812 B
Makefile
PROCESSOR := ARM9
|
|
|
|
TARGET := $(shell basename "$(CURDIR)")
|
|
|
|
SOURCE := source
|
|
BUILD := build
|
|
|
|
SUBARCH := -D$(PROCESSOR) -march=armv5te -mtune=arm946e-s -mthumb -mfloat-abi=soft
|
|
INCDIRS := source source/common source/filesys source/crypto source/fatfs source/nand source/virtual source/game source/gamecart source/lodepng source/qrcodegen source/system source/utils
|
|
INCLUDE := $(foreach dir,$(INCDIRS),-I"$(shell pwd)/$(dir)")
|
|
|
|
ASFLAGS += $(SUBARCH) $(INCLUDE)
|
|
CFLAGS += $(SUBARCH) $(INCLUDE) -fno-builtin-memcpy -flto
|
|
LDFLAGS += $(SUBARCH) -Wl,--use-blx,-Map,$(TARGET).map -flto
|
|
|
|
include ../Makefile.common
|
|
include ../Makefile.build
|
|
|
|
arm9_data.elf: arm9.elf
|
|
$(OBJCOPY) -O elf32-littlearm -j .rodata* -j .data* -j .bss* $< $@
|
|
|
|
arm9_code.elf: arm9.elf
|
|
$(OBJCOPY) -O elf32-littlearm -j .text* -j .vectors* $< $@
|