Mercurial > MadButterfly
annotate examples/svg2code_ex/Makefile.pmake @ 1395:a768d74e5f49
Fix the svg:use. For a svg:use, it is a group which include the content it reference. It means that we can not tween it to its origin object directly. Instead, we need to ungroup it and then use the result matrix to generate the tweened transformation matrix. Therefore, we need to concate its matrix to the referenced object.
Ad center object when the bbox-x is not available.
author | wycc |
---|---|
date | Sat, 02 Apr 2011 05:36:36 +0800 |
parents | d0646a6df46f |
children |
rev | line source |
---|---|
72 | 1 SVG=svg2code_ex.svg |
175
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
2 PREFIX?=/usr/local |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
3 TOOLSDIR?=$(PREFIX)/share/mb |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
4 INCDIR?=$(PREFIX)/include |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
5 LIBDIR?=$(PREFIX)/lib |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
6 BINDIR?=$(PREFIX)/bin |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
7 INCS=-I$(INCDIR) |
78 | 8 CFLAGS+=`pkg-config --cflags cairo` $(INCS) -Wall |
175
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
9 LDFLAGS=-L$(LIBDIR) `pkg-config --libs cairo` |
78 | 10 LIBS=-lmbfly |
11 BINS= ex1 | |
175
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
12 SVG2CODE= $(BINDIR)/svg2code.py |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
13 MB_C_HEADER= $(TOOLSDIR)/mb_c_header.m4 |
67e13d694230
Fix bug of src/Makefile.am & examples accept PREFIX variable.
Thinker K.F. Li <thinker@branda.to>
parents:
163
diff
changeset
|
14 MB_C_SOURCE= $(TOOLSDIR)/mb_c_source.m4 |
72 | 15 |
78 | 16 all: $(BINS) |
17 | |
18 ex1: main.o $(SVG:C/.svg/.o/) | |
19 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) | |
20 | |
21 main.o: main.c $(SVG:C/.svg/.h/) | |
22 $(CC) $(CFLAGS) -c -o $@ main.c | |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
23 |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
72
diff
changeset
|
24 $(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
|
25 $(CC) -c $(CFLAGS) -o $@ $(SVG:C/.svg/.c/) |
72 | 26 |
27 $(SVG:C/.svg/.mb/): $(SVG) | |
163 | 28 $(SVG2CODE) $(.ALLSRC) $@ |
78 | 29 |
72 | 30 $(SVG:C/.svg/.c/): $(SVG:C/.svg/.mb/) |
163 | 31 m4 -I $(TOOLSDIR) $(MB_C_SOURCE) $(.ALLSRC) > $@ |
72 | 32 |
33 $(SVG:C/.svg/.h/): $(SVG:C/.svg/.mb/) | |
163 | 34 m4 -I $(TOOLSDIR) $(MB_C_HEADER) $(.ALLSRC) > $@ |
72 | 35 |
36 clean: | |
91
a0d1ecdaa6a5
clean *.core in makefile.
Thinker K.F. Li <thinker@branda.to>
parents:
78
diff
changeset
|
37 for i in *.mb *.o *.core *~ $(SVG:C/.svg/.c/) $(SVG:C/.svg/.h/) $(BINS); do \ |
72 | 38 if [ -e "$$i" ]; then \ |
39 echo "delete $$i"; \ | |
40 rm -f "$$i"; \ | |
41 fi; \ | |
163 | 42 done |