From 02f83a0299a3f4fab33834b58ec915bfdd017a07 Mon Sep 17 00:00:00 2001 From: Alex Bates <16batesa@gmail.com> Date: Sat, 9 Jan 2021 16:32:44 +0000 Subject: [PATCH] get objects from splat.yaml instead of build ld script --- Makefile | 7 +++++-- sources.mk | 2 +- tools/n64splat | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e09c5c697c..9d8b32f37e 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,9 @@ GENERATED_HEADERS := include/ld_addrs.h $(foreach dir, $(NPC_DIRS), include/$(di ### Targets ### clean: + rm -rf $(BUILD_DIR) + +clean-all: rm -rf $(BUILD_DIR) bin msg img sprite .splat_cache $(LD_SCRIPT) clean-code: @@ -127,7 +130,8 @@ clean-code: tools: make -C tools -setup: clean submodules tools $(LD_SCRIPT) +setup: clean-all submodules tools + @make split # tools/star-rod submodule intentionally omitted submodules: @@ -266,7 +270,6 @@ include/sprite/npc/%.h: sprite/npc/%/SpriteSheet.xml tools/gen_sprite_animations $(LD_SCRIPT): $(SPLAT_YAML) $(SPLAT) --modes ld bin Yay0 PaperMarioMapFS PaperMarioMessages img PaperMarioNpcSprites --new - make $(GENERATED_HEADERS) $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) @mkdir -p $(shell dirname $@) diff --git a/sources.mk b/sources.mk index cd1c1ca871..eb50f99b69 100644 --- a/sources.mk +++ b/sources.mk @@ -1,4 +1,4 @@ -OBJECTS = $(subst BUILD_DIR, $(BUILD_DIR), $(shell grep -E 'BUILD_DIR.+\.o' papermario.ld -o)) +OBJECTS := $(foreach OBJECT, $(shell $(PYTHON) tools/n64splat/list_objects.py $(SPLAT_YAML)), $(BUILD_DIR)/$(OBJECT)) DSL_C_FILES := $(shell grep -lrF "SCRIPT" src) diff --git a/tools/n64splat b/tools/n64splat index 27b29d50ee..bbadaa3cad 160000 --- a/tools/n64splat +++ b/tools/n64splat @@ -1 +1 @@ -Subproject commit 27b29d50eeefe3a812037ee8b96a221011c3fd4e +Subproject commit bbadaa3cadf20d46390740644e6f84abf583d4be