f8668c1e |
1 | # Makefile for the PuTTY icon suite. |
2 | |
3 | ICONS = putty puttycfg puttygen pscp pageant pterm ptermcfg |
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 | CICONS = xpmputty.c xpmpucfg.c xpmpterm.c xpmptcfg.c |
14 | |
15 | base: icos cicons |
16 | |
17 | all: pngs monopngs base # truepngs currently disabled by default |
18 | |
19 | pngs: $(PNGS) |
20 | monopngs: $(MONOPNGS) |
21 | truepngs: $(TRUEPNGS) |
22 | |
23 | icos: $(ICOS) |
24 | cicons: $(CICONS) |
25 | |
26 | $(PNGS): %.png: mkicon.py |
27 | ./mkicon.py $(MODE) $(join $(subst -, ,$(basename $@)),_icon) $@ |
28 | |
29 | $(MONOPNGS): %.png: mkicon.py |
30 | ./mkicon.py -2 $(MODE) $(join $(subst -, ,$(subst -mono,,$(basename $@))),_icon) $@ |
31 | |
32 | $(TRUEPNGS): %.png: mkicon.py |
33 | ./mkicon.py -T $(MODE) $(join $(subst -, ,$(subst -true,,$(basename $@))),_icon) $@ |
34 | |
35 | putty.ico: putty-16.png putty-32.png putty-48.png \ |
36 | putty-16-mono.png putty-32-mono.png putty-48-mono.png |
37 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
38 | |
39 | puttycfg.ico: puttycfg-16.png puttycfg-32.png puttycfg-48.png \ |
40 | puttycfg-16-mono.png puttycfg-32-mono.png puttycfg-48-mono.png |
41 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
42 | |
43 | puttygen.ico: puttygen-16.png puttygen-32.png puttygen-48.png \ |
44 | puttygen-16-mono.png puttygen-32-mono.png puttygen-48-mono.png |
45 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
46 | |
47 | pageant.ico: pageant-16.png pageant-32.png pageant-48.png \ |
48 | pageant-16-mono.png pageant-32-mono.png pageant-48-mono.png |
49 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
50 | |
51 | pageants.ico: pageant-16.png pageant-16-mono.png |
52 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
53 | |
54 | pscp.ico: pscp-16.png pscp-32.png pscp-48.png \ |
55 | pscp-16-mono.png pscp-32-mono.png pscp-48-mono.png |
56 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
57 | |
58 | xpmputty.c: putty-16.png putty-32.png putty-48.png |
59 | ./cicon.pl main_icon $^ > $@ |
60 | |
61 | xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png |
62 | ./cicon.pl cfg_icon $^ > $@ |
63 | |
64 | xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png |
65 | ./cicon.pl main_icon $^ > $@ |
66 | |
67 | xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png |
68 | ./cicon.pl cfg_icon $^ > $@ |
69 | |
70 | clean: |
71 | rm -f *.png *.ico *.c |