annotate examples/svg2code_ex/Makefile @ 72:171a8cb7e4b5

Makefile for svg2code_ex
author Thinker K.F. Li <thinker@branda.to>
date Wed, 13 Aug 2008 09:25:57 +0800
parents
children 9ab15ebc9061
rev   line source
72
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 SVG=svg2code_ex.svg
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 TOOLSDIR=../../tools
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 all: $(SVG:C/.svg/.mb/) $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/)
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 $(SVG:C/.svg/.mb/): $(SVG)
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7 $(TOOLSDIR)/svg2code.py $(.ALLSRC) $@
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/)
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 m4 -I $(TOOLSDIR) mb_c_source.m4 $(.ALLSRC) > $@
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/)
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 m4 -I $(TOOLSDIR) mb_c_header.m4 $(.ALLSRC) > $@
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15 clean:
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 for i in *.mb *.o *~; do \
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17 if [ -e "$$i" ]; then \
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 echo "delete $$i"; \
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19 rm -f "$$i"; \
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20 fi; \
171a8cb7e4b5 Makefile for svg2code_ex
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21 done