diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,4 +1,8 @@ -MD5 := md5sum -c +ifeq (,$(shell which sha1sum)) +SHA1 := shasum +else +SHA1 := sha1sum +endif .SUFFIXES: .PHONY: all clean tools compare crystal crystal11 @@ -36,7 +40,7 @@ clean: rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) compare: $(roms) - @$(MD5) roms.md5 + @$(SHA1) -c roms.sha1 tools: make -C tools/ @@ -58,11 +62,11 @@ pokecrystal.gbc: $(crystal_obj) rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ -# For files that the compressor can't match, there will be a .lz file suffixed with the hash of the correct uncompressed file. +# For files that the compressor can't match, there will be a .lz file suffixed with the md5 hash of the correct uncompressed file. # If the hash of the uncompressed file matches, use this .lz instead. # This allows pngs to be used for compressed graphics and still match. -%.lz: hash = $(shell md5sum $(*D)/$(*F) | sed "s/\(.\{8\}\).*/\1/") +%.lz: hash = $(shell tools/md5 $(*D)/$(*F) | sed "s/\(.\{8\}\).*/\1/") %.lz: % $(eval filename := $@.$(hash)) $(if $(wildcard $(filename)),cp $(filename) $@,tools/lzcomp $< $@) |
