diff options
author | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-22 16:12:26 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-22 16:12:26 -0400 |
commit | e856f5d2ac6d36a442dbca605ba60a7f40a097d9 (patch) | |
tree | d9802d92f69dffb9f2eb3153f4224785941009f4 | |
parent | c9a953200e5bb1cfc7d876d9e0428ac99dcbc419 (diff) |
Factor out gfx- and slack-specific rules into .mk files
-rw-r--r-- | Makefile | 38 | ||||
-rw-r--r-- | gfx/gfx.mk | 21 | ||||
-rw-r--r-- | slack/slack.mk | 4 |
3 files changed, 35 insertions, 28 deletions
@@ -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 $< $@ diff --git a/gfx/gfx.mk b/gfx/gfx.mk new file mode 100644 index 0000000..05b940c --- /dev/null +++ b/gfx/gfx.mk @@ -0,0 +1,21 @@ +$(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 diff --git a/slack/slack.mk b/slack/slack.mk new file mode 100644 index 0000000..0a752c7 --- /dev/null +++ b/slack/slack.mk @@ -0,0 +1,4 @@ +$(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 |