diff options
Diffstat (limited to 'light-client/makefile')
-rw-r--r-- | light-client/makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/light-client/makefile b/light-client/makefile new file mode 100644 index 00000000..39199caa --- /dev/null +++ b/light-client/makefile @@ -0,0 +1,21 @@ + +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 $^ |