From 3064e84c5f6e2cc4b812713f89725124ebc757a9 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sun, 20 Aug 2017 12:35:36 -0400 Subject: Use $(filter) to check targets --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 063cdc27b..329269cf4 100644 --- a/Makefile +++ b/Makefile @@ -36,11 +36,9 @@ all: crystal crystal: pokecrystal.gbc crystal11: pokecrystal11.gbc -# Ensure that the tools are built when making the ROM -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),tools) -Makefile: tools -endif +# Build tools when building the rom +ifeq (,$(filter clean tools,$(MAKECMDGOALS))) +Makefile: tools ; endif clean: -- cgit v1.2.3 From 7ba068d45b6e1744402ab910f2ded4e9e32429c6 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sun, 20 Aug 2017 12:38:32 -0400 Subject: Makefile formatting --- Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 329269cf4..aa3d73c17 100644 --- a/Makefile +++ b/Makefile @@ -75,9 +75,12 @@ pokecrystal.gbc: $(crystal_obj) %.lz: hash = $(shell tools/md5 $(*D)/$(*F) | sed "s/\(.\{8\}\).*/\1/") %.lz: % $(eval filename := $@.$(hash)) - $(if $(wildcard $(filename)),cp $(filename) $@,tools/lzcomp $< $@) + $(if $(wildcard $(filename)),\ + cp $(filename) $@,\ + tools/lzcomp $< $@) -# Terrible hacks to match animations. Delete these rules if you don't care about matching. + +### Terrible hacks to match animations. Delete these rules if you don't care about matching. # Dewgong has an unused tile id in its last frame. The tile itself is missing. gfx/pics/dewgong/frames.asm: gfx/pics/dewgong/front.animated.tilemap gfx/pics/dewgong/front.dimensions @@ -97,7 +100,7 @@ gfx/pics/girafarig/front.animated.tilemap: gfx/pics/girafarig/front.2bpp gfx/pic tools/pokemon_animation_graphics --girafarig -t $@ $^ -# Pokemon pic graphics rules +### Pokemon pic graphics rules gfx/pics/%/normal.gbcpal: gfx/pics/%/front.png rgbgfx -p $@ $< @@ -118,7 +121,7 @@ gfx/pics/%/front.animated.tilemap: gfx/pics/%/front.2bpp gfx/pics/%/front.dimens # rgbgfx -o $@ $< -# Misc file-specific graphics rules +### Misc file-specific graphics rules gfx/shrink1.2bpp: rgbgfx += -h gfx/shrink2.2bpp: rgbgfx += -h @@ -190,11 +193,13 @@ gfx/unknown/172f1f.2bpp: tools/gfx += --trim-whitespace %.2bpp: %.png rgbgfx $(rgbgfx) -o $@ $< - $(if $(tools/gfx),tools/gfx $(tools/gfx) -o $@ $@) + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -o $@ $@) %.1bpp: %.png rgbgfx $(rgbgfx) -d1 -o $@ $< - $(if $(tools/gfx),tools/gfx $(tools/gfx) -d1 -o $@ $@) + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -d1 -o $@ $@) %.tilemap: %.png rgbgfx -t $@ $< -- cgit v1.2.3 From 59a27d5907874a43662b1b95b84f8558abae0473 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sun, 20 Aug 2017 13:34:26 -0400 Subject: tools/gfx: Replace --width with --png --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index aa3d73c17..208af0aed 100644 --- a/Makefile +++ b/Makefile @@ -138,16 +138,16 @@ gfx/mail/0b9cfe.1bpp: tools/gfx += --remove-whitespace gfx/pokedex/%.2bpp: tools/gfx += --trim-whitespace -gfx/title/crystal.2bpp: tools/gfx += --interleave --width=48 -gfx/title/old_fg.2bpp: tools/gfx += --interleave --width=64 +gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$< +gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$< gfx/title/logo.2bpp: rgbgfx += -x 4 gfx/trade/ball.2bpp: tools/gfx += --remove-whitespace -gfx/slots_2.2bpp: tools/gfx += --interleave --width=16 -gfx/slots_3.2bpp: tools/gfx += --interleave --width=24 --remove-duplicates --keep-whitespace --remove-xflip -gfx/slots_3a.2bpp: tools/gfx += --interleave --width=16 -gfx/slots_3b.2bpp: tools/gfx += --interleave --width=24 --remove-duplicates --keep-whitespace --remove-xflip +gfx/slots_2.2bpp: tools/gfx += --interleave --png=$< +gfx/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip +gfx/slots_3a.2bpp: tools/gfx += --interleave --png=$< +gfx/slots_3b.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip gfx/fx/angels.2bpp: tools/gfx += --trim-whitespace gfx/fx/beam.2bpp: tools/gfx += --remove-xflip --remove-yflip --remove-whitespace -- cgit v1.2.3