From 677805498cf651739ac8355d2f388cf63ae0a5fd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jun 2020 09:56:15 -0400 Subject: Set tracking on filesystem; narc on the narcs --- Makefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 523a0936..e14c9e89 100644 --- a/Makefile +++ b/Makefile @@ -172,6 +172,8 @@ MWCCARM = tools/mwccarm/$(MWCCVERSION)/mwccarm.exe # only dependency should be MWCCARM. MWLDARM = tools/mwccarm/$(MWCCVERSION)/mwldarm.exe MWASMARM = tools/mwccarm/$(MWCCVERSION)/mwasmarm.exe +NARCCOMP = tools/narccomp/narccomp$(EXE) +SCANINC = tools/scaninc/scaninc$(EXE) AS = $(WINE) $(MWASMARM) CC = $(WINE) $(MWCCARM) @@ -215,6 +217,9 @@ else NODEP := 1 endif +.SECONDARY: +.DELETE_ON_ERROR: +.SECONDEXPANSION: .PHONY: all clean mostlyclean tidy tools $(TOOLDIRS) patch_mwasmarm arm9 arm7 MAKEFLAGS += --no-print-directory @@ -252,10 +257,16 @@ patch_mwasmarm: ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS)) -$(BUILD_DIR)/%.o: %.c +ifeq (,$(NODEP)) +$(BUILD_DIR)/%.o: dep = $(shell $(SCANINC) -I include -I include-mw -I arm9/lib/include $(filter $*.c,$(C_FILES)) $(filter $*.cpp,$(CXX_FILES)) $(filter $*.s,$(S_FILES))) +else +$(BUILD_DIR)/%.o: dep := +endif + +$(BUILD_DIR)/%.o: %.c $$(dep) $(CC) -c $(CFLAGS) -o $@ $< -$(BUILD_DIR)/%.o: %.s +$(BUILD_DIR)/%.o: %.s $$(dep) $(AS) $(ASFLAGS) $< -o $@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) @@ -297,6 +308,12 @@ DUMMY != mkdir -p $(ALL_DIRS) %.png: ; %.pal: ; +%.narc: members = $(shell find $(@D)/$*/*) +%.narc: $$(members) + $(NARCCOMP) -o $@ -p 255 $^ + +files/poketool/personal/pms.narc: ; + $(BUILD_DIR)/pokediamond_bnr.bin: pokediamond.bsf graphics/icon.4bpp graphics/icon.gbapal $(MAKEBANNER) $< $@ -- cgit v1.2.3 From 3e3328342369ac8143a442c5b85ad56ce587b195 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jun 2020 10:01:09 -0400 Subject: Update narc dependency scanning --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e14c9e89..90184b8b 100644 --- a/Makefile +++ b/Makefile @@ -308,7 +308,7 @@ DUMMY != mkdir -p $(ALL_DIRS) %.png: ; %.pal: ; -%.narc: members = $(shell find $(@D)/$*/*) +%.narc: members = $(wildcard $(@D)/$*/*) %.narc: $$(members) $(NARCCOMP) -o $@ -p 255 $^ -- cgit v1.2.3 From 3229f51b696bb1f7af7a9286f4f196c55eb7c21f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jun 2020 10:20:14 -0400 Subject: Add missing pms.narc; add missing rule for %.arc --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 20ad9383..4cb2b845 100644 --- a/Makefile +++ b/Makefile @@ -312,6 +312,10 @@ DUMMY != mkdir -p $(ALL_DIRS) %.narc: $$(members) $(NARCCOMP) -o $@ -p 255 $^ +%.arc: members = $(wildcard $(@D)/$*/*) +%.arc: $$(members) + $(NARCCOMP) -o $@ -p 255 $^ + files/poketool/personal/pms.narc: ; $(BUILD_DIR)/pokediamond_bnr.bin: pokediamond.bsf graphics/icon.4bpp graphics/icon.gbapal -- cgit v1.2.3