From 2b7237e299d5018e837bae550d18deeff3c7db7d Mon Sep 17 00:00:00 2001 From: aaaaaa123456789 Date: Sat, 23 May 2020 14:30:04 -0300 Subject: Match LZ compressed files (#724) Replace lzcomp with new version and match all LZ compressed files --- Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 51dcd8957..0c6b1e426 100644 --- a/Makefile +++ b/Makefile @@ -108,16 +108,13 @@ pokecrystal-au.gbc: $(crystal_au_obj) layout.link $(RGBFIX) -Cjv -t PM_CRYSTAL -i BYTU -k 01 -l 0x33 -m 0x10 -r 3 -p 0 $@ -# 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 compression rules + +# Delete this line if you don't care about matching and just want optimal compression. +include gfx/lz.mk -%.lz: hash = $(shell tools/md5 $(*D)/$(*F) | sed "s/\(.\{8\}\).*/\1/") %.lz: % - $(eval filename := $@.$(hash)) - $(if $(wildcard $(filename)),\ - cp $(filename) $@,\ - tools/lzcomp -- $< $@) + tools/lzcomp $(LZFLAGS) -- $< $@ ### Pokemon pic animation rules -- cgit v1.2.3