1 # Makefile for the PuTTY icon suite.
3 ICONS = putty puttycfg puttygen pscp pageant pterm ptermcfg puttyins
6 MODE = # override to -it on command line for opaque testing
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))
12 ICOS = putty.ico puttygen.ico pscp.ico pageant.ico pageants.ico puttycfg.ico \
15 CICONS = xpmputty.c xpmpucfg.c xpmpterm.c xpmptcfg.c
19 all: pngs monopngs base icns # truepngs currently disabled by default
33 $(PNGS): %.png: mkicon.py
34 ./mkicon.py $(MODE) $(join $(subst -, ,$(basename $@)),_icon) $@
36 $(MONOPNGS): %.png: mkicon.py
37 ./mkicon.py -2 $(MODE) $(join $(subst -, ,$(subst -mono,,$(basename $@))),_icon) $@
39 $(TRUEPNGS): %.png: mkicon.py
40 ./mkicon.py -T $(MODE) $(join $(subst -, ,$(subst -true,,$(basename $@))),_icon) $@
42 putty.ico: putty-16.png putty-32.png putty-48.png \
43 putty-16-mono.png putty-32-mono.png putty-48-mono.png
44 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
46 puttycfg.ico: puttycfg-16.png puttycfg-32.png puttycfg-48.png \
47 puttycfg-16-mono.png puttycfg-32-mono.png puttycfg-48-mono.png
48 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
50 puttygen.ico: puttygen-16.png puttygen-32.png puttygen-48.png \
51 puttygen-16-mono.png puttygen-32-mono.png puttygen-48-mono.png
52 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
54 pageant.ico: pageant-16.png pageant-32.png pageant-48.png \
55 pageant-16-mono.png pageant-32-mono.png pageant-48-mono.png
56 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
58 pageants.ico: pageant-16.png pageant-16-mono.png
59 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
61 pscp.ico: pscp-16.png pscp-32.png pscp-48.png \
62 pscp-16-mono.png pscp-32-mono.png pscp-48-mono.png
63 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
65 # Because the installer icon makes heavy use of brown when drawing
66 # the cardboard box, it's worth having 8-bit versions of it in
67 # addition to the 4- and 1-bit ones.
68 puttyins.ico: puttyins-16.png puttyins-32.png puttyins-48.png \
69 puttyins-16-mono.png puttyins-32-mono.png \
70 puttyins-48-mono.png \
71 puttyins-16-true.png puttyins-32-true.png \
73 ./icon.pl -8 $(filter %-true.png, $^) \
74 -4 $(filter-out %-true.png, $(filter-out %-mono.png, $^)) \
75 -1 $(filter %-mono.png, $^) > $@
77 # Icon for the website. (This isn't linked into "make all".)
78 website.ico: putty-16.png
81 xpmputty.c: putty-16.png putty-32.png putty-48.png
82 ./cicon.pl main_icon $^ > $@
84 xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png
85 ./cicon.pl cfg_icon $^ > $@
87 xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png
88 ./cicon.pl main_icon $^ > $@
90 xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png
91 ./cicon.pl cfg_icon $^ > $@
93 PuTTY.icns: putty-16-mono.png putty-16.png \
94 putty-32-mono.png putty-32.png \
95 putty-48-mono.png putty-48.png \
97 ./macicon.py mono:putty-16-mono.png colour:putty-16.png \
98 mono:putty-32-mono.png colour:putty-32.png \
99 mono:putty-48-mono.png colour:putty-48.png \
100 colour:putty-128.png \
104 rm -f *.png *.ico *.icns *.c