]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - icons/Makefile
Stop using physical tabs in Python. (I was goaded into doing this by
[PuTTY.git] / icons / Makefile
1 # Makefile for the PuTTY icon suite.
2
3 ICONS = putty puttycfg puttygen pscp pageant pterm ptermcfg puttyins
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        puttyins.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 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 \
70               puttyins-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 # Icon for the website. (This isn't linked into "make all".)
76 website.ico: putty-16.png
77         ./icon.pl -4 $^ >$@
78
79 xpmputty.c: putty-16.png putty-32.png putty-48.png
80         ./cicon.pl main_icon $^ > $@
81
82 xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png
83         ./cicon.pl cfg_icon $^ > $@
84
85 xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png
86         ./cicon.pl main_icon $^ > $@
87
88 xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png
89         ./cicon.pl cfg_icon $^ > $@
90
91 clean:
92         rm -f *.png *.ico *.c