ref: 202cea9705e20f7aba242fa7863f2a79bd88925c
parent: fb154f5a6e43a86801fd16f392633c854d099ac4
author: Ben10do <[email protected]>
date: Fri Jun 9 17:55:09 EDT 2017
- Make the tools implicitly when making the ROM - Add a clean target to the tools Makefile - Run said clean target when cleaning the pokecrystal directory
--- a/Makefile
+++ b/Makefile
@@ -29,11 +29,12 @@
roms := pokecrystal.gbc pokecrystal11.gbc
all: crystal
-crystal: pokecrystal.gbc
-crystal11: pokecrystal11.gbc
+crystal: tools pokecrystal.gbc
+crystal11: tools pokecrystal11.gbc
clean:
rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
+ make clean -C tools/
compare: $(roms)
@$(MD5) roms.md5
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,6 +1,6 @@
-.PHONY: all
+.PHONY: all clean
-all: \
+tools := \
lzcomp \
png_dimensions \
scan_includes \
@@ -7,7 +7,12 @@
palette \
pokemon_animation \
pokemon_animation_graphics
+
+all: $(tools)
@:
+
+clean:
+ rm -f $(tools)
%: %.c
$(CC) -o $@ $<