Mercurial > MadButterfly
annotate examples/svg2code_ex/Makefile @ 163:7d700e5f82ba
* revert M4FLAGS
author | "Mat <MatLinuxer2@gmail.com>" |
---|---|
date | Mon, 20 Oct 2008 14:25:31 +0800 |
parents | c14cb6d12030 |
children | 67e13d694230 |
rev | line source |
---|---|
72 | 1 SVG=svg2code_ex.svg |
110 | 2 TOOLSDIR=/usr/local/share/mb |
163 | 3 INCS=-I/usr/local/include -I../../src/mb |
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 | |
163 | 8 SVG2CODE= ../../tools/svg2code.py |
9 MB_C_HEADER= ../../tools/mb_c_header.m4 | |
10 MB_C_SOURCE= ../../tools/mb_c_source.m4 | |
72 | 11 |
78 | 12 all: $(BINS) |
13 | |
14 ex1: main.o $(SVG:C/.svg/.o/) | |
15 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) | |
16 | |
17 main.o: main.c $(SVG:C/.svg/.h/) | |
18 $(CC) $(CFLAGS) -c -o $@ main.c | |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
19 |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
20 $(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
|
21 $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) |
72 | 22 |
23 $(SVG:C/.svg/.mb/): $(SVG) | |
163 | 24 $(SVG2CODE) $(.ALLSRC) $@ |
78 | 25 |
72 | 26 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) |
163 | 27 m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ |
72 | 28 |
29 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) | |
163 | 30 m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ |
72 | 31 |
32 clean: | |
91
a0d1ecdaa6a5
clean *.core in makefile.
Thinker K.F. Li <thinker@branda.to>
parents:
78
diff
changeset
|
33 for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ |
72 | 34 if [ -e "$$i" ]; then \ |
35 echo "delete $$i"; \ | |
36 rm -f "$$i"; \ | |
37 fi; \ | |
163 | 38 done |