diff options
| author | yenatch <yenatch@gmail.com> | 2017-09-24 01:25:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-24 01:25:03 -0400 |
| commit | 01caa369ec5f3d49d151c8323ac86bd7e1df040a (patch) | |
| tree | b3895b7fe5aff89acd0e01d3f89aa58a94c6f628 /Makefile | |
| parent | 17448c51a51bb3ddd20b0349ae274980638b0980 (diff) | |
| parent | 94577d95532368a940bf0bb9334ba2c7eb858eb5 (diff) | |
Merge pull request #379 from yenatch/tools
Refactor scan_includes and add warnings for tools
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 37 |
1 files changed, 20 insertions, 17 deletions
@@ -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: @@ -79,9 +77,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 @@ -101,7 +102,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 $@ $< @@ -122,7 +123,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 @@ -139,17 +140,17 @@ 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/trade/game_boy_n64.2bpp: tools/gfx += --trim-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 @@ -194,11 +195,13 @@ gfx/unknown/171db1.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 $@ $< |
