Initial import.
[mlpccg.git] / Makefile
1 all: mlpccg.appcache
2
3 appcache>contents = $(shell grep -vFx -e "*" -e "CACHE MANIFEST" -e "CACHE:" -e "NETWORK:" -e "FALLBACK:" $(1) | grep -v -e "^\#" )
4
5 mlpccg.appcache: $(call appcache>contents,mlpccg.appcache)
6 sed -i '' "s/^# Last-Updated: .*$$/# Last-Updated: `date -u +'%Y-%m-%dT%H:%M:%SZ'`/" $@
7
8 INKSCAPE := $(firstword $(shell command -v inkscape /Applications/Inkscape.app/Contents/Resources/bin/inkscape) inkscape)
9
10 FAVICON_SIZES = 32 57 64 72 76 114 120 144 152 196 256
11 FAVICONS = $(patsubst %,favicon_%.png,$(FAVICON_SIZES)) favicon.ico
12
13 favicon_%.png: favicon.svg
14 $(INKSCAPE) -z -e $@ -w $* -h $* $<
15
16 %.ico: %_48.png %_32.png %_24.png %_64.png %_16.png
17 convert $^ $@
18
19 all: $(FAVICONS) mlpccg.appcache
20
21 clean:
22 $(RM) $(FAVICONS)