Add an icon for the PuTTY installer. Design concept (and noticing
[u/mdw/putty] / icons / Makefile
1 # Makefile for the PuTTY icon suite.
2
3 ICONS = putty puttycfg puttygen pscp pageant pterm ptermcfg installer
4 SIZES = 16 32 48
5
6 MODE = # override to -it on command line for opaque testing
7
8 PNGS = $(foreach I,$(ICONS),$(foreach S,$(SIZES),$(I)-$(S).png))
9 MONOPNGS = $(foreach I,$(ICONS),$(foreach S,$(SIZES),$(I)-$(S)-mono.png))
10 TRUEPNGS = $(foreach I,$(ICONS),$(foreach S,$(SIZES),$(I)-$(S)-true.png))
11
12 ICOS = putty.ico puttygen.ico pscp.ico pageant.ico pageants.ico puttycfg.ico \
13 installer.ico
14 CICONS = xpmputty.c xpmpucfg.c xpmpterm.c xpmptcfg.c
15
16 base: icos cicons
17
18 all: pngs monopngs base # truepngs currently disabled by default
19
20 pngs: $(PNGS)
21 monopngs: $(MONOPNGS)
22 truepngs: $(TRUEPNGS)
23
24 icos: $(ICOS)
25 cicons: $(CICONS)
26
27 install: icos cicons
28 cp $(ICOS) ../windows
29 cp $(CICONS) ../unix
30
31 $(PNGS): %.png: mkicon.py
32 ./mkicon.py $(MODE) $(join $(subst -, ,$(basename $@)),_icon) $@
33
34 $(MONOPNGS): %.png: mkicon.py
35 ./mkicon.py -2 $(MODE) $(join $(subst -, ,$(subst -mono,,$(basename $@))),_icon) $@
36
37 $(TRUEPNGS): %.png: mkicon.py
38 ./mkicon.py -T $(MODE) $(join $(subst -, ,$(subst -true,,$(basename $@))),_icon) $@
39
40 putty.ico: putty-16.png putty-32.png putty-48.png \
41 putty-16-mono.png putty-32-mono.png putty-48-mono.png
42 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
43
44 puttycfg.ico: puttycfg-16.png puttycfg-32.png puttycfg-48.png \
45 puttycfg-16-mono.png puttycfg-32-mono.png puttycfg-48-mono.png
46 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
47
48 puttygen.ico: puttygen-16.png puttygen-32.png puttygen-48.png \
49 puttygen-16-mono.png puttygen-32-mono.png puttygen-48-mono.png
50 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
51
52 pageant.ico: pageant-16.png pageant-32.png pageant-48.png \
53 pageant-16-mono.png pageant-32-mono.png pageant-48-mono.png
54 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
55
56 pageants.ico: pageant-16.png pageant-16-mono.png
57 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
58
59 pscp.ico: pscp-16.png pscp-32.png pscp-48.png \
60 pscp-16-mono.png pscp-32-mono.png pscp-48-mono.png
61 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
62
63 # Because the installer icon makes heavy use of brown when drawing
64 # the cardboard box, it's worth having 8-bit versions of it in
65 # addition to the 4- and 1-bit ones.
66 installer.ico: installer-16.png installer-32.png installer-48.png \
67 installer-16-mono.png installer-32-mono.png \
68 installer-48-mono.png \
69 installer-16-true.png installer-32-true.png \
70 installer-48-true.png
71 ./icon.pl -8 $(filter %-true.png, $^) \
72 -4 $(filter-out %-true.png, $(filter-out %-mono.png, $^)) \
73 -1 $(filter %-mono.png, $^) > $@
74
75 xpmputty.c: putty-16.png putty-32.png putty-48.png
76 ./cicon.pl main_icon $^ > $@
77
78 xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png
79 ./cicon.pl cfg_icon $^ > $@
80
81 xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png
82 ./cicon.pl main_icon $^ > $@
83
84 xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png
85 ./cicon.pl cfg_icon $^ > $@
86
87 clean:
88 rm -f *.png *.ico *.c