From 876c91bdf7c469ff88dd043bc4edcbe66cbdd0cd Mon Sep 17 00:00:00 2001 From: codl Date: Thu, 4 Aug 2022 19:36:50 +0200 Subject: [PATCH] Add Makefile This makefile generates PNG versions and an archive that can be imported directly into Mastodon. It requires imagemagick and oxipng. --- .gitignore | 2 ++ Makefile | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9309987 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.png +dragn-emoji.tar.gz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..907dc1a --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +SVGS := $(wildcard *.svg) +PNGS := $(SVGS:%.svg=%.png) + +.PHONY: clean + +dragn-emoji.tar.gz: $(PNGS) + tar -c $? | gzip > $@ + +%.nooptim.png: %.svg + magick convert -background none -geometry 256x256 $< $@ + +%.png: %.nooptim.png + oxipng -o max --out $@ $< + +clean: + find . -maxdepth 1 -name '*.png' -delete + rm -f dragn-emoji.tar.gz