1 VPATH=../../sources/vector
4 TILE_SVGS=$(shell find $(patsubst %, $(VPATH)/%, $(TILE_DIRS)) -name "*.svg")
5 TILE_PNGS=$(patsubst $(VPATH)/%.svg, %.png, $(TILE_SVGS))
7 ROACH=$(filter roach/%, $(TILE_PNGS))
8 ROACH_32=$(patsubst roach/%, roach_32/%, $(ROACH))
9 ROACH_21=$(patsubst roach/%, roach_21/%, $(ROACH))
10 ROACH_QUARTET=$(patsubst roach/%, roach_quartet/%, $(ROACH))
11 ROACH_NONET=$(patsubst roach/%, roach_nonet/%, $(ROACH))
13 all: $(TILE_PNGS) $(ROACH_32) $(ROACH_21) $(ROACH_QUARTET) $(ROACH_NONET)
18 $(1)/%.png: $(1)/%.svg
19 @mkdir -p `dirname $$@`
20 @inkscape -z -e $$@ -w 64 -h 64 $$<
23 $(foreach tiledir,$(TILE_DIRS),$(eval $(call tile,$(tiledir))))
27 roach_32/%.png: roach/%.svg
28 @mkdir -p `dirname $@`
29 @inkscape -z -e $@ -w 32 -h 32 $<
31 roach_21/%.png: roach/%.svg
32 @mkdir -p `dirname $@`
33 @inkscape -z -e $@ -w 21 -h 21 $<
37 roach_quartet/roach_%.png: $(foreach i, 1 2 3 4, roach_32/roach_$(i).png)
38 @mkdir -p roach_quartet
39 @montage $(foreach i, -1 0 1 2 , roach_32/roach_$$(( ( $(i) + $(patsubst roach_quartet/roach_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none $@
41 roach_quartet/eyes_%.png: $(foreach i, 1 2 3 4, roach_32/eyes_$(i).png)
42 @mkdir -p roach_quartet
43 @montage $(foreach i, -1 0 1 2 , roach_32/eyes_$$(( ( $(i) + $(patsubst roach_quartet/eyes_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none $@
47 roach_nonet/roach_%.png: $(foreach i, 1 2 3 4, roach_21/roach_$(i).png)
49 @montage $(foreach i, -1 0 1 2 3 4 5 6 7 , roach_21/roach_$$(( ( $(i) + $(patsubst roach_nonet/roach_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 $@
51 roach_nonet/eyes_%.png: $(foreach i, 1 2 3 4, roach_21/eyes_$(i).png)
53 @montage $(foreach i, -1 0 1 2 3 4 5 6 7 , roach_21/eyes_$$(( ( $(i) + $(patsubst roach_nonet/eyes_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none - | convert - -background none -gravity southeast -splice 1x1 $@