summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2017-06-24 18:34:25 -0400
committeryenatch <yenatch@gmail.com>2017-06-24 18:42:28 -0400
commitf03b898250597680f115cec5cec06953b403acf9 (patch)
tree86caaf639a4f272ced57ce174d1a65dd613d1b44 /Makefile
parentf12e42ab6d41740a6e9302f1f12250a0f72c3f9d (diff)
Add a md5 tool to avoid md5sum dependency.
md5sum is missing in macOS and (presumably) BSD. An alternative would have been to use sha1sum instead, but it's probably a good idea to have as few dependencies as possible, so this doesn't happen again. fixes #364
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b51652a00..3382d9a41 100644
--- a/Makefile
+++ b/Makefile
@@ -62,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 $< $@)