From 7828969e61cada2228c6995a1135bd811a0c1dea Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Mon, 2 Nov 2020 19:18:21 +0000 Subject: [PATCH 1/3] generate ld_addrs.h without splat --- Makefile | 2 ++ tools/n64splat | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 735667c976..dac0d3fb0e 100644 --- a/Makefile +++ b/Makefile @@ -213,6 +213,8 @@ $(BUILD_DIR)/$(TARGET).elf: $(BUILD_DIR)/$(LD_SCRIPT) $(OBJECTS) $(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf $(OBJCOPY) $< $@ -O binary +include/ld_addrs.h: $(BUILD_DIR)/$(LD_SCRIPT) + grep -E "[^ ]+ =" $< -o | sed 's/^/extern void* /; s/ =/;/' > $@ ### Make Settings ### diff --git a/tools/n64splat b/tools/n64splat index 42c5f587eb..c78e4fe9d8 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 42c5f587eb8b2bc669f2710c93ff10c46ae48dc3 +Subproject commit c78e4fe9d863d4b3fa203af5f8b7179bb1c7c82f From 4f0f43a3c91bddc13422b0aefd0a50815ded9efd Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Mon, 2 Nov 2020 19:22:44 +0000 Subject: [PATCH 2/3] add include/ld_addrs.h as an explicit dependency of %.c --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dac0d3fb0e..15a3c7f519 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 $(LD) -r -b binary -o $@ $< # Compile C files -$(BUILD_DIR)/%.c.o: %.c $(MDEPS) +$(BUILD_DIR)/%.c.o: %.c $(MDEPS) include/ld_addrs.h @mkdir -p $(shell dirname $@) $(CPP) $(CPPFLAGS) -o - $(CPPMFLAGS) $< | iconv --from UTF-8 --to SHIFT-JIS | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - From 2c4fcac207c2462d5500a1330212b5ed2e12f362 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Mon, 2 Nov 2020 20:16:19 +0000 Subject: [PATCH 3/3] fix build --- Makefile | 5 ++--- tools/n64splat | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 15a3c7f519..9058c9f924 100644 --- a/Makefile +++ b/Makefile @@ -130,12 +130,12 @@ $(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0 $(LD) -r -b binary -o $@ $< # Compile C files -$(BUILD_DIR)/%.c.o: %.c $(MDEPS) include/ld_addrs.h +$(BUILD_DIR)/%.c.o: %.c $(MDEPS) | include/ld_addrs.h @mkdir -p $(shell dirname $@) $(CPP) $(CPPFLAGS) -o - $(CPPMFLAGS) $< | iconv --from UTF-8 --to SHIFT-JIS | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - # Compile C files (with DSL macros) -$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) tools/compile_dsl_macros.py +$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c $(MDEPS) tools/compile_dsl_macros.py | include/ld_addrs.h @mkdir -p $(shell dirname $@) $(CPP) $(CPPFLAGS) -o - $< $(CPPMFLAGS) | $(PYTHON) tools/compile_dsl_macros.py | iconv --from UTF-8 --to SHIFT-JIS | $(CC) $(CFLAGS) -o - | $(OLD_AS) $(OLDASFLAGS) -o $@ - @@ -178,7 +178,6 @@ $(BUILD_DIR)/%.i8.png: %.png @mkdir -p $(shell dirname $@) $(PYTHON) tools/convert_image.py i8 $< $@ $(IMG_FLAGS) - ASSET_FILES := $(foreach asset, $(ASSETS), $(BUILD_DIR)/bin/assets/$(asset)) YAY0_ASSET_FILES := $(foreach asset, $(filter-out %_tex, $(ASSET_FILES)), $(asset).Yay0) diff --git a/tools/n64splat b/tools/n64splat index c78e4fe9d8..8f74e0bcce 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit c78e4fe9d863d4b3fa203af5f8b7179bb1c7c82f +Subproject commit 8f74e0bccec04e12c3dec27f64c257f61def594c