1 VPATH=../../sources/vector
3 SVGS=$(shell find $(VPATH) -name "*.svg")
4 PNGS=$(patsubst $(VPATH)/%.svg, %.png, $(SVGS))
5 ROACH=$(filter roach, $(PNGS))
7 ROACH_32=$(subst roach, roach_32, $(ROACH))
8 ROACH_21=$(subst roach, roach_21, $(ROACH))
10 all: $(PNGS) $(ROACH_32) $(ROACH_21) roach_quartet roach_nonet
15 @mkdir -p `dirname $@`
16 @inkscape -z -e $@ -w 64 -h 64 $<
20 roach_32/%.png: roach/%.svg
21 @mkdir -p `dirname $@`
22 @inkscape -z -e $@ -w 32 -h 32 $<
24 roach_21/%.png: roach/%.svg
25 @mkdir -p `dirname $@`
26 @inkscape -z -e $@ -w 21 -h 21 $<
30 roach_quartet: $(ROACH_32)
31 @mkdir -p roach_quartet
32 @montage $(foreach i, 1 2 3 4, roach_32/roach_$(i).png) -geometry +0+0 -background none roach_quartet/roach_1.png
33 @montage $(foreach i, 2 3 4 1, roach_32/roach_$(i).png) -geometry +0+0 -background none roach_quartet/roach_2.png
34 @montage $(foreach i, 3 4 1 2, roach_32/roach_$(i).png) -geometry +0+0 -background none roach_quartet/roach_3.png
35 @montage $(foreach i, 4 1 2 3, roach_32/roach_$(i).png) -geometry +0+0 -background none roach_quartet/roach_4.png
36 @montage $(foreach i, 1 2 3 4, roach_32/eyes_$(i).png) -geometry +0+0 -background none roach_quartet/eyes_1.png
37 @montage $(foreach i, 2 3 4 1, roach_32/eyes_$(i).png) -geometry +0+0 -background none roach_quartet/eyes_2.png
38 @montage $(foreach i, 3 4 1 2, roach_32/eyes_$(i).png) -geometry +0+0 -background none roach_quartet/eyes_3.png
39 @montage $(foreach i, 4 1 2 3, roach_32/eyes_$(i).png) -geometry +0+0 -background none roach_quartet/eyes_4.png
43 roach_nonet: $(ROACH_21)
45 @montage $(foreach i, 1 2 3 4 1 2 3 4 1, roach_21/roach_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/roach_1.png
46 @montage $(foreach i, 2 3 4 1 2 3 4 1 2, roach_21/roach_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/roach_2.png
47 @montage $(foreach i, 3 4 1 2 3 4 1 2 3, roach_21/roach_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/roach_3.png
48 @montage $(foreach i, 4 1 2 3 4 1 2 3 4, roach_21/roach_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/roach_4.png
49 @montage $(foreach i, 1 2 3 4 1 2 3 4 1, roach_21/eyes_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/eyes_1.png
50 @montage $(foreach i, 2 3 4 1 2 3 4 1 2, roach_21/eyes_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/eyes_2.png
51 @montage $(foreach i, 3 4 1 2 3 4 1 2 3, roach_21/eyes_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/eyes_3.png
52 @montage $(foreach i, 4 1 2 3 4 1 2 3 4, roach_21/eyes_$(i).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 roach_nonet/eyes_4.png