1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# SVG2PNG: Each is buggy in their own way
# ImageMagick: doesn't support transparency
#SVG2PNG = convert $1 -format png $(if $3,-resize $3x)$(if $4,$4) $(if $5,-bacground $5) $2
# librsvg: doesn't support <style> element
#SVG2PNG = rsvg-convert $1 -o $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,--background-color=$5)
# Inkscape: messes up gradients
SVG2PNG = inkscape $1 --export-png $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,-b '$5')
# PNG2ICO
# png2ico: doesn't read PNG transparency properly
#PNG2ICO = png2ico $2 $1
# icotool: has perl dependencies
PNG2ICO = icotool -c $1 -o $2
# pngcrush is available from [pcr]
#PNGCRUSH = cp $1 $2
PNGCRUSH = pngcrush $1 $2
all: website \
logo.png \
logotype-color-darkbg.png \
logotype-color-lightbg.png \
logotype-grayscale.png \
logotype-mono-black.png \
logotype-mono-white.png
website: \
apple-touch-icon-57x57.png \
apple-touch-icon-72x72.png \
apple-touch-icon-114x114.png \
apple-touch-icon-144x144.png \
icon-transparent-64x64.png \
archlogo.png \
favicon.ico \
silhouette.png
clean:
rm -f *.png *.ico
%.raw.png: %.svg Makefile
$(call SVG2PNG,$<,$@)
%.png: %.raw.png Makefile
$(call PNGCRUSH,$<,$@)
%.ico: %.png Makefile
$(call PNG2ICO,$<,$@)
.INTERMEDIATE: favicon.raw.png
favicon.raw.png: logo.svg Makefile
$(call SVG2PNG,$<,$@,16)
.INTERMEDIATE: silhouette.raw.png
silhouette.raw.png: silhouette.svg Makefile
$(call SVG2PNG,$<,$@,125)
apple-touch-icon-%.raw.png: logo.svg Makefile
$(call SVG2PNG,$<,$@,$(firstword $(subst x, ,$*)),$(lastword $(subst x, ,$*)),#ffffff)
icon-transparent-%.raw.png: logo.svg Makefile
$(call SVG2PNG,$<,$@,$(firstword $(subst x, ,$*)),$(lastword $(subst x, ,$*)))
|