summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ad6ee0d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+SOURCES = $(wildcard *.kra)
+BASENAMES = $(foreach f, $(SOURCES), $(basename $(f)))
+
+all:
+ make $(foreach f, $(BASENAMES), png/$(f).png)
+ make $(foreach f, $(BASENAMES), gif/$(f).gif)
+ make $(foreach f, $(BASENAMES), telegram/$(f).png)
+
+# export krita file to png
+png/%.png: %.kra
+ krita --export $(basename $(@F)).kra --export-filename $@
+
+# 512x512 gif
+gif/%.gif: png/%.png
+ magick png/$(basename $(@F)).png -resize 512x512 $@
+
+# 512x512 png
+telegram/%.png: png/%.png
+ magick png/$(basename $(@F)).png -resize 512x512 $@
+
+.PHONY: all
+
+# do not delete full-size pngs
+.PRECIOUS: png/%.png