From 38c0be840e653454f7a9745ca63ae5f001a70e28 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 21 Jan 2018 11:13:52 -0600 Subject: preprocess and copy ld script files to build directory --- Makefile | 4 ++-- ld_script.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 83f37d8b7..556293b7a 100644 --- a/Makefile +++ b/Makefile @@ -111,9 +111,9 @@ tidy: %.elf: $(LD_SCRIPT) $(ALL_OBJECTS) cd $(BUILD_DIR) && $(LD) -T ld_script.ld -Map ../../$(MAP) ../../$(LIBGCC) ../../$(LIBC) -o ../../$@ -$(LD_SCRIPT): $(BUILD_DIR)/sym_common.ld ld_script.txt +$(LD_SCRIPT): ld_script.txt $(BUILD_DIR)/sym_common.ld $(BUILD_DIR)/sym_ewram.ld $(BUILD_DIR)/sym_bss.ld cd $(BUILD_DIR) && sed -e "s#tools/#../../tools/#g" ../../ld_script.txt >ld_script.ld -$(BUILD_DIR)/sym_common.ld: sym_common.txt +$(BUILD_DIR)/sym_%.ld: sym_%.txt $(CPP) -P $(CPPFLAGS) $< > $@ $(C_OBJECTS): $(BUILD_DIR)/%.o: %.c $$(C_DEP) diff --git a/ld_script.txt b/ld_script.txt index 6931eb661..5dcdf948d 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -9,7 +9,7 @@ SECTIONS { ewram (NOLOAD) : ALIGN(4) { - INCLUDE "../../sym_ewram.txt" + INCLUDE "sym_ewram.ld" . = 0x40000; } @@ -20,7 +20,7 @@ SECTIONS { ALIGN(4) { /* .bss starts at 0x3000000 */ - INCLUDE "../../sym_bss.txt" + INCLUDE "sym_bss.ld" /* .bss.code starts at 0x3000F60 */ src/libs/m4a_2.o(.bss.code); -- cgit v1.2.3