view source/Makefile @ 54:2c1b85b6f457

Add .get_file() to resources.
author Simon Cross <hodgestar@gmail.com>
date Sun, 01 Sep 2013 18:46:05 +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