34f9a3bf09165abf7cafdf67328283ceeca0980d
[yukkurigames.com.git] / Makefile
1 #!/usr/bin/make -f
2
3 PNGCRUSH ?= pngcrush
4 PNGCRUSHFLAGS ?= -brute -blacken -reduce -q
5 CRUSH.png ?= $(PNGCRUSH) $(PNGCRUSHFLAGS)
6
7 favicon_%.png: favicon.svg
8 rsvg-convert -w $* -h $* $^ > $@
9 $(CRUSH.png) -ow $@
10
11 %.ico: %_48.png %_32.png %_16.png
12 convert $^ $@
13
14 ICONS := favicon.ico favicon_128.png favicon_192.png favicon_256.png
15
16 GIT_LOCAL := ~git/bare
17 GIT_REMOTE := http://git.yukkurigames.com
18
19 SUBPROJECTS := 123456789 choicecss heroik matrixcreatrix mlpccg webcart1000 labelle
20
21 all: $(ICONS)
22
23 $(SUBPROJECTS):
24 git clone $(firstword $(wildcard $(GIT_LOCAL)/$@.git) $(GIT_REMOTE)/$@.git)
25 $(MAKE) $@.update
26
27 %.update: | %
28 cd $* && git pull
29 if [ -f $*/Makefile ]; then $(MAKE) -C $*; fi
30
31 update:
32 git pull
33 $(MAKE) all $(addsuffix .update,$(SUBPROJECTS))
34
35 clean:
36 $(RM) $(ICONS)
37