aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 684d665e..3e2a6e89 100644
--- a/Makefile
+++ b/Makefile
@@ -38,19 +38,19 @@ all: $(roms)
red: pokered.gbc
blue: pokeblue.gbc
-# For contributors to make sure a change didn't affect the contents of the rom.
-compare: $(roms)
- @$(MD5) roms.md5
-
clean:
- rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
+ rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete
$(MAKE) clean -C tools/
tidy:
- rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym)
+ rm -f $(roms) $(pokered_obj) $(pokeblue_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) rgbdscheck.o
$(MAKE) clean -C tools/
+# For contributors to make sure a change didn't affect the original contents of the ROMs.
+compare: $(roms)
+ @$(MD5) roms.md5
+
tools:
$(MAKE) -C tools/
@@ -64,11 +64,14 @@ endif
$(pokered_obj): RGBASMFLAGS += -D _RED
$(pokeblue_obj): RGBASMFLAGS += -D _BLUE
+rgbdscheck.o: rgbdscheck.asm
+ $(RGBASM) -o $@ $<
+
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
# It doesn't look like $(shell) can be deferred so there might not be a better way.
define DEP
-$1: $2 $$(shell tools/scan_includes $2)
+$1: $2 $$(shell tools/scan_includes $2) | rgbdscheck.o
$$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$<
endef