From e856f5d2ac6d36a442dbca605ba60a7f40a097d9 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 22 Sep 2020 16:12:26 -0400 Subject: Factor out gfx- and slack-specific rules into .mk files --- Makefile | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 24d3d31..903f5db 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,8 @@ coverage: $(ROM:.gb=.map) utils/coverage.py $< +### Build products + %.map: %.gb $(CORRECTEDROM): %-correctheader.gb: %.gb @@ -87,6 +89,14 @@ $(BASEROM): $(BUILD)/shim.asm: shim.sym | $$(dir $$@) $(MAKE_SHIM) $< > $@ + +### Misc file-specific graphics rules +include gfx/gfx.mk +include slack/slack.mk + + +### Catch-all build target rules + $(BUILD)/%.o: $(BUILD)/%.asm | $$(dir $$@) $(RGBASM) $(RGBASMFLAGS) $(OUTPUT_OPTION) $< @@ -96,34 +106,6 @@ $(BUILD)/%.o: %.asm | $$(dir $$@) $(BUILD)/%.d: %.asm | $$(dir $$@) $(SCAN_INCLUDES) @$(SCAN_INCLUDES) -b $(BUILD)/ -i $(BUILD)/ -i ./ -o $@ -t $(@:.d=.o) $< - -### Misc file-specific graphics rules - -$(BUILD)/slack/corrupted_9e1c.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/slack/corrupted_a66c.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/slack/corrupted_b1e3.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/slack/sgb_border_gold_corrupted.2bpp: tools/gfx += --trim-whitespace - -$(BUILD)/gfx/sgb/sgb_border_alt.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/gfx/sgb/sgb_border_gold.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/gfx/sgb/sgb_border_silver.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/gfx/sgb/sgb_border_silver.2bpp: tools/gfx += --trim-whitespace - -$(BUILD)/gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace - -$(BUILD)/gfx/trainer_gear/town_map.2bpp: tools/gfx += --trim-trailing - -$(BUILD)/gfx/minigames/slots.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/gfx/minigames/poker.2bpp: tools/gfx += --trim-whitespace - -$(BUILD)/gfx/intro/purin_pikachu.2bpp: tools/gfx += --trim-whitespace - -$(BUILD)/gfx/battle_anims/attack_animations_1.2bpp: tools/gfx += --trim-whitespace -$(BUILD)/gfx/battle_anims/attack_animations_2.2bpp: tools/gfx += --trim-whitespace - - -### Catch-all graphics rules - .PRECIOUS: $(BUILD)/%.pic $(BUILD)/%.pic: $(BUILD)/%.2bpp tools/pkmncompress | $$(dir $$@) tools/pkmncompress $< $@ -- cgit v1.2.3