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 SIMPLE_DIRS=roach_management
8 SIMPLE_SVGS=$(shell find $(patsubst %, $(VPATH)/%, $(SIMPLE_DIRS)) -name "*.svg")
9 SIMPLE_PNGS=$(patsubst $(VPATH)/%.svg, %.png, $(SIMPLE_SVGS))
11 ROACH=$(filter roach/%, $(TILE_PNGS))
12 ROACH_32=$(patsubst roach/%, roach_32/%, $(ROACH))
13 ROACH_21=$(patsubst roach/%, roach_21/%, $(ROACH))
14 ROACH_QUARTET=$(patsubst roach/%, roach_quartet/%, $(ROACH))
15 ROACH_NONET=$(patsubst roach/%, roach_nonet/%, $(ROACH))
17 all: $(TILE_PNGS) $(SIMPLE_PNGS)\
18 $(ROACH_32) $(ROACH_21) $(ROACH_QUARTET) $(ROACH_NONET)
23 $(1)/%.png: $(1)/%.svg
24 @mkdir -p `dirname $$@`
25 @inkscape -z -e $$@ -w 64 -h 64 $$<
28 $(foreach tiledir,$(TILE_DIRS),$(eval $(call tile,$(tiledir))))
33 $(1)/%.png: $(1)/%.svg
34 @mkdir -p `dirname $$@`
35 @inkscape -z -e $$@ $$<
38 $(foreach simpledir,$(SIMPLE_DIRS),$(eval $(call simple,$(simpledir))))
42 roach_32/%.png: roach/%.svg
43 @mkdir -p `dirname $@`
44 @inkscape -z -e $@ -w 32 -h 32 $<
46 roach_21/%.png: roach/%.svg
47 @mkdir -p `dirname $@`
48 @inkscape -z -e $@ -w 21 -h 21 $<
52 roach_quartet/roach_%.png: $(foreach i, 1 2 3 4, roach_32/roach_$(i).png)
53 @mkdir -p roach_quartet
54 @montage $(foreach i, -1 0 1 2 , roach_32/roach_$$(( ( $(i) + $(patsubst roach_quartet/roach_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none $@
56 roach_quartet/eyes_%.png: $(foreach i, 1 2 3 4, roach_32/eyes_$(i).png)
57 @mkdir -p roach_quartet
58 @montage $(foreach i, -1 0 1 2 , roach_32/eyes_$$(( ( $(i) + $(patsubst roach_quartet/eyes_%.png,%, $@) ) % 4 + 1 )).png) -geometry +0+0 -background none $@
62 roach_nonet/roach_%.png: $(foreach i, 1 2 3 4, roach_21/roach_$(i).png)
64 @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 $@
66 roach_nonet/eyes_%.png: $(foreach i, 1 2 3 4, roach_21/eyes_$(i).png)
68 @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 $@