diff options
author | yenatch <yenatch@gmail.com> | 2017-05-29 19:15:34 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-05-29 19:15:34 -0400 |
commit | e78034eb8c818036d2cb11c9b87ad8ae366be0cf (patch) | |
tree | 85c314d8b2fa6639c97ddbb95e0f2a6e6b17e2b3 | |
parent | c81a7aa1621326827088142fa5cc484bbcca9535 (diff) |
Use a separate makefile for tools
- Fix crystal11
- Fix a bug where the dependency checks would run regardless of target
Fixes 0bd74cdd7341a4cff5da73e1c32ac0d237ec8e08
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | tools/Makefile | 13 |
2 files changed, 18 insertions, 7 deletions
@@ -1,7 +1,7 @@ MD5 := md5sum -c --quiet .SUFFIXES: -.PHONY: all clean tools crystal crystal11 +.PHONY: all clean tools compare crystal crystal11 .SECONDEXPANSION: .PRECIOUS: .SECONDARY: @@ -38,13 +38,11 @@ clean: compare: pokecrystal.gbc pokecrystal11.gbc @$(MD5) roms.md5 -tools: tools/lzcomp tools/png_dimensions tools/scan_includes tools/palette tools/pokemon_animation tools/pokemon_animation_graphics ; +tools: + make -C tools/ -tools/%: tools/%.c - $(CC) -o $@ $< - -$(crystal11_obj): dep = $(shell tools/scan_includes $(@D)/$*.asm) -$(crystal11_obj): %11.o: %.asm $$(dep) +%11.o: dep = $(shell tools/scan_includes $(@D)/$*.asm) +%11.o: %.asm $$(dep) rgbasm -D CRYSTAL11 -o $@ $< %.o: dep = $(shell tools/scan_includes $(@D)/$*.asm) diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 000000000..4a04027fc --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,13 @@ +.PHONY: all + +all: \ + lzcomp \ + png_dimensions \ + scan_includes \ + palette \ + pokemon_animation \ + pokemon_animation_graphics + @: + +%: %.c + $(CC) -o $@ $< |