Mercurial > MadButterfly
annotate examples/svg2code_ex/Makefile @ 110:c14cb6d12030
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 12 Sep 2008 15:31:10 +0800 |
parents | 565b55508c8d |
children | 7d700e5f82ba |
rev | line source |
---|---|
72 | 1 SVG=svg2code_ex.svg |
110 | 2 TOOLSDIR=/usr/local/share/mb |
108 | 3 INCS=-I/usr/local/include |
78 | 4 CFLAGS+=`pkg-config --cflags cairo` $(INCS) -Wall |
108 | 5 LDFLAGS=-L/usr/local/lib `pkg-config --libs cairo` |
78 | 6 LIBS=-lmbfly |
7 BINS= ex1 | |
72 | 8 |
78 | 9 all: $(BINS) |
10 | |
11 ex1: main.o $(SVG:C/.svg/.o/) | |
12 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) | |
13 | |
14 main.o: main.c $(SVG:C/.svg/.h/) | |
15 $(CC) $(CFLAGS) -c -o $@ main.c | |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
16 |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
17 $(SVG:C/.svg/.o/): $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
18 $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) |
72 | 19 |
20 $(SVG:C/.svg/.mb/): $(SVG) | |
110 | 21 /usr/local/bin/svg2code.py $(.ALLSRC) $@ |
78 | 22 |
72 | 23 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) |
24 m4 -I $(TOOLSDIR) mb_c_source.m4 $(.ALLSRC) > $@ | |
25 | |
26 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) | |
27 m4 -I $(TOOLSDIR) mb_c_header.m4 $(.ALLSRC) > $@ | |
28 | |
29 clean: | |
91
a0d1ecdaa6a5
clean *.core in makefile.
Thinker K.F. Li <thinker@branda.to>
parents:
78
diff
changeset
|
30 for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ |
72 | 31 if [ -e "$$i" ]; then \ |
32 echo "delete $$i"; \ | |
33 rm -f "$$i"; \ | |
34 fi; \ | |
35 done |