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 \
14 CICONS = xpmputty.c xpmpucfg.c xpmpterm.c xpmptcfg.c
18 all: pngs monopngs base # truepngs currently disabled by default
31 $(PNGS): %.png: mkicon.py
32 ./mkicon.py $(MODE) $(join $(subst -, ,$(basename $@)),_icon) $@
34 $(MONOPNGS): %.png: mkicon.py
35 ./mkicon.py -2 $(MODE) $(join $(subst -, ,$(subst -mono,,$(basename $@))),_icon) $@
37 $(TRUEPNGS): %.png: mkicon.py
38 ./mkicon.py -T $(MODE) $(join $(subst -, ,$(subst -true,,$(basename $@))),_icon) $@
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, $^) > $@
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, $^) > $@
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, $^) > $@
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, $^) > $@
56 pageants.ico: pageant-16.png pageant-16-mono.png
57 ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@
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, $^) > $@
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 puttyins.ico: puttyins-16.png puttyins-32.png puttyins-48.png \
67 puttyins-16-mono.png puttyins-32-mono.png \
68 puttyins-48-mono.png \
69 puttyins-16-true.png puttyins-32-true.png \
71 ./icon.pl -8 $(filter %-true.png, $^) \
72 -4 $(filter-out %-true.png, $(filter-out %-mono.png, $^)) \
73 -1 $(filter %-mono.png, $^) > $@
75 # Icon for the website. (This isn't linked into "make all".)
76 website.ico: putty-16.png
79 xpmputty.c: putty-16.png putty-32.png putty-48.png
80 ./cicon.pl main_icon $^ > $@
82 xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png
83 ./cicon.pl cfg_icon $^ > $@
85 xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png
86 ./cicon.pl main_icon $^ > $@
88 xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png
89 ./cicon.pl cfg_icon $^ > $@