ALL_TA = $(shell find textures/tiles -name '*.ta') ALL_PNG = $(shell find textures/tiles -name '*.png') ALL_TA_IMPORT = $(patsubst %.import.png,%.ta,$(shell find textures/tiles -name '*.import.png')) ALL_PNG_EXPORT = $(patsubst %.ta,%.png,$(ALL_TA)) .PHONY: tex_pack tex_export tex_import clean tex_pack: textures/atlas.ta tex_import: $(ALL_TA_IMPORT) tex_export: $(ALL_PNG_EXPORT) clean: rm -f $(ALL_PNG) rm -f textures/atlas.ta textures/atlas.meta.csv %.ta: %.import.png ../target/release/tex_import $< $@ %.png: %.ta ../target/release/tex_export $< $@ textures/atlas.ta textures/atlas.meta.csv: $(ALL_TA) ../target/release/tex_pack textures/atlas.ta textures/atlas.meta.csv $^