| 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 | install: icos cicons |
| 27 | cp $(ICOS) ../windows |
| 28 | cp $(CICONS) ../unix |
| 29 | |
| 30 | $(PNGS): %.png: mkicon.py |
| 31 | ./mkicon.py $(MODE) $(join $(subst -, ,$(basename $@)),_icon) $@ |
| 32 | |
| 33 | $(MONOPNGS): %.png: mkicon.py |
| 34 | ./mkicon.py -2 $(MODE) $(join $(subst -, ,$(subst -mono,,$(basename $@))),_icon) $@ |
| 35 | |
| 36 | $(TRUEPNGS): %.png: mkicon.py |
| 37 | ./mkicon.py -T $(MODE) $(join $(subst -, ,$(subst -true,,$(basename $@))),_icon) $@ |
| 38 | |
| 39 | putty.ico: putty-16.png putty-32.png putty-48.png \ |
| 40 | putty-16-mono.png putty-32-mono.png putty-48-mono.png |
| 41 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 42 | |
| 43 | puttycfg.ico: puttycfg-16.png puttycfg-32.png puttycfg-48.png \ |
| 44 | puttycfg-16-mono.png puttycfg-32-mono.png puttycfg-48-mono.png |
| 45 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 46 | |
| 47 | puttygen.ico: puttygen-16.png puttygen-32.png puttygen-48.png \ |
| 48 | puttygen-16-mono.png puttygen-32-mono.png puttygen-48-mono.png |
| 49 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 50 | |
| 51 | pageant.ico: pageant-16.png pageant-32.png pageant-48.png \ |
| 52 | pageant-16-mono.png pageant-32-mono.png pageant-48-mono.png |
| 53 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 54 | |
| 55 | pageants.ico: pageant-16.png pageant-16-mono.png |
| 56 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 57 | |
| 58 | pscp.ico: pscp-16.png pscp-32.png pscp-48.png \ |
| 59 | pscp-16-mono.png pscp-32-mono.png pscp-48-mono.png |
| 60 | ./icon.pl -4 $(filter-out %-mono.png, $^) -1 $(filter %-mono.png, $^) > $@ |
| 61 | |
| 62 | xpmputty.c: putty-16.png putty-32.png putty-48.png |
| 63 | ./cicon.pl main_icon $^ > $@ |
| 64 | |
| 65 | xpmpucfg.c: puttycfg-16.png puttycfg-32.png puttycfg-48.png |
| 66 | ./cicon.pl cfg_icon $^ > $@ |
| 67 | |
| 68 | xpmpterm.c: pterm-16.png pterm-32.png pterm-48.png |
| 69 | ./cicon.pl main_icon $^ > $@ |
| 70 | |
| 71 | xpmptcfg.c: ptermcfg-16.png ptermcfg-32.png ptermcfg-48.png |
| 72 | ./cicon.pl cfg_icon $^ > $@ |
| 73 | |
| 74 | clean: |
| 75 | rm -f *.png *.ico *.c |