Verify that rgbds is at least verson 0.4.0

Adapt the INSTALL guide from pokecrystal.
This commit is contained in:
Rangi 2020-07-04 01:03:25 -04:00
parent e4e0af4d67
commit 73be62fad6
3 changed files with 177 additions and 42 deletions

View file

@ -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