Mercurial > MadButterfly
annotate src/Makefile @ 115:3895d2224e67
Tank
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 14 Sep 2008 02:17:57 +0800 |
parents | 565b55508c8d |
children | 1d74eb3861b7 |
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 \ |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
41
diff
changeset
|
2 redraw_man.c timer.c animate.c paint.c event.c observer.c \ |
77 | 3 X_supp.c timertool.c tools.c |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
4 OBJS = ${SRCS:C/(.*)\.c/\1.o/g} |
1 | 5 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
|
6 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
|
7 LDFLAGS = `pkg-config --libs cairo` |
108 | 8 BINS = libmbfly.a X_main |
9 PREFIX?=/usr/local/ | |
10 HEADERS= X_supp.h animate.h mb.h mb_timer.h mb_types.h \ | |
11 observer.h paint.h redraw_man.h shapes.h tools.h | |
12 MKDIR?= mkdir -p | |
1 | 13 |
2 | 14 all: $(BINS) |
1 | 15 |
108 | 16 install: $(BINS) |
17 $(INSTALL) -d ${PREFIX}include/mb | |
18 .for i in $(HEADERS) | |
19 $(INSTALL) -o root -m 0644 ${i} ${PREFIX}include/mb/ | |
20 .endfor | |
21 $(INSTALL) -o root libmbfly.a ${PREFIX}lib/ | |
22 | |
23 uninstall: | |
24 .for i in $(HEADERS) | |
25 rm -f ${PREFIX}include/mb/${i} | |
26 .endfor | |
27 rm -f ${PREFIX}lib/libmbfly.a | |
28 rmdir ${PREFIX}include/mb/ | |
29 | |
1 | 30 testcase: testcase.o $(TESTCASE_OBJS) |
31 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit | |
32 | |
78 | 33 libmbfly.a: $(OBJS) |
34 $(AR) -cr $@ $(.ALLSRC) | |
35 | |
36 | |
1 | 37 .for i in $(TESTCASE_OBJS) |
38 ${i}: ${i:C/testcase-(.*).o/\1.c/} | |
39 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC) | |
40 .endfor | |
41 | |
42 testcase.o: testcase.c | |
43 $(CC) $(CFLAGS) -c $(.ALLSRC) | |
44 | |
78 | 45 X_main: X_main.o libmbfly.a |
4
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
46 $(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
|
47 |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
48 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
|
49 $(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
|
50 |
1 | 51 clean: |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
52 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS); do \ |
1 | 53 echo "delete $$i"; \ |
54 rm -f $$i; \ | |
55 done | |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
56 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
57 depend: |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
58 mkdep $(CFLAGS) $(SRCS) |