Mercurial > MadButterfly
annotate src/Makefile @ 64:c668c5c3ceae
M4 macro for C binding.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 13 Aug 2008 02:07:40 +0800 |
parents | 400b4b5db0dc |
children | 9ab15ebc9061 |
rev | line source |
---|---|
33
d82749f77108
Fix bug of demo and remove *_fill() and *_stroke().
Thinker K.F. Li <thinker@branda.to>
parents:
30
diff
changeset
|
1 SRCS = coord.c geo.c shape_path.c shape_text.c shape_rect.c \ |
41 | 2 redraw_man.c timer.c animate.c paint.c event.c tools.c |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
3 OBJS = ${SRCS:C/(.*)\.c/\1.o/g} |
1 | 4 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g} |
15
c2ce186a5c37
X_main uses rdman_redraw_all()
Thinker K.F. Li <thinker@branda.to>
parents:
12
diff
changeset
|
5 CFLAGS+= -Wall -I/usr/local/include `pkg-config --cflags cairo` |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
6 LDFLAGS = `pkg-config --libs cairo` |
4
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
7 BINS = testcase X_main |
1 | 8 |
2 | 9 all: $(BINS) |
1 | 10 |
11 testcase: testcase.o $(TESTCASE_OBJS) | |
12 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit | |
13 | |
14 .for i in $(TESTCASE_OBJS) | |
15 ${i}: ${i:C/testcase-(.*).o/\1.c/} | |
16 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC) | |
17 .endfor | |
18 | |
19 testcase.o: testcase.c | |
20 $(CC) $(CFLAGS) -c $(.ALLSRC) | |
21 | |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
22 X_main: X_main.o $(OBJS) |
4
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
23 $(CC) $(CFALGS) `pkg-config --libs cairo` -o $@ $(.ALLSRC) |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
24 |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
25 X_main.o: X_main.c |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
26 $(CC) $(CFLAGS) `pkg-config --cflags cairo` -c $(.ALLSRC) |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
27 |
1 | 28 clean: |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
29 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS); do \ |
1 | 30 echo "delete $$i"; \ |
31 rm -f $$i; \ | |
32 done | |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
33 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
34 depend: |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
35 mkdep $(CFLAGS) $(SRCS) |