diff options
author | camthesaxman <cameronghall@cox.net> | 2018-01-21 11:13:52 -0600 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2018-01-21 11:13:52 -0600 |
commit | 38c0be840e653454f7a9745ca63ae5f001a70e28 (patch) | |
tree | 1554b537fde48666300e1f3ccb425677bba7fb15 | |
parent | f52a7bea85cac244b63b50fcf038830450946fb0 (diff) |
preprocess and copy ld script files to build directory
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | ld_script.txt | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -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); |