Mercurial > nagslang
view source/Makefile @ 160:0c9b0449485e
Consolidate image rendering stuff a bit.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 03 Sep 2013 00:50:11 +0200 |
parents | bcaa3b7a0890 |
children | eba98879f47f |
line wrap: on
line source
SOURCES = $(shell find images -name '*.svg') TARGETS = $(patsubst %.svg,%.png,$(SOURCES)) OPTIMIZE = 1 all: $(TARGETS) install: $(TARGETS) set -ex; \ for fn in $(TARGETS); do \ mkdir -p ../data/"$$(dirname $$fn)"; \ cp $$fn ../data/$$fn; \ done clean: rm -f $(TARGETS) %.png: %.svg inkscape --export-png $@ --export-dpi 9 $< ifeq ($(OPTIMIZE),1) optipng -o4 -preserve $@ advpng -z4 $@ endif