Mercurial > MadButterfly
annotate src/Makefile.pmake @ 235:65cabbdd5284
termporary revision
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 25 Dec 2008 18:40:27 +0800 |
parents | 29e1b2bffe4c |
children | 50d253d0fcba |
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 \ |
116
1d74eb3861b7
move animation actions from animate.c to files.
Thinker K.F. Li <thinker@branda.to>
parents:
108
diff
changeset
|
3 X_supp.c timertool.c tools.c shift.c chgcolor.c \ |
235 | 4 visibility.c rotate.c prop.c mouse.c |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
5 OBJS = ${SRCS:C/(.*)\.c/\1.o/g} |
235 | 6 TESTCASE_SRCS = ${SRCS:C/X_supp\.c//} |
7 TESTCASE_OBJS = ${TESTCASE_SRCS:C/(.*)\.c/testcase-\1.o/g} | |
224
29e1b2bffe4c
X backend only sent EVT_MOUSE_MOVE_RAW to MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
171
diff
changeset
|
8 CFLAGS+= -Wall -I../include -I/usr/local/include \ |
29e1b2bffe4c
X backend only sent EVT_MOUSE_MOVE_RAW to MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
171
diff
changeset
|
9 `pkg-config --cflags cairo` |
5
9c331ec9e210
SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
4
diff
changeset
|
10 LDFLAGS = `pkg-config --libs cairo` |
108 | 11 BINS = libmbfly.a X_main |
12 PREFIX?=/usr/local/ | |
13 HEADERS= X_supp.h animate.h mb.h mb_timer.h mb_types.h \ | |
14 observer.h paint.h redraw_man.h shapes.h tools.h | |
15 MKDIR?= mkdir -p | |
1 | 16 |
2 | 17 all: $(BINS) |
1 | 18 |
108 | 19 install: $(BINS) |
20 $(INSTALL) -d ${PREFIX}include/mb | |
21 .for i in $(HEADERS) | |
22 $(INSTALL) -o root -m 0644 ${i} ${PREFIX}include/mb/ | |
23 .endfor | |
24 $(INSTALL) -o root libmbfly.a ${PREFIX}lib/ | |
25 | |
26 uninstall: | |
27 .for i in $(HEADERS) | |
28 rm -f ${PREFIX}include/mb/${i} | |
29 .endfor | |
30 rm -f ${PREFIX}lib/libmbfly.a | |
31 rmdir ${PREFIX}include/mb/ | |
32 | |
1 | 33 testcase: testcase.o $(TESTCASE_OBJS) |
34 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit | |
35 | |
78 | 36 libmbfly.a: $(OBJS) |
37 $(AR) -cr $@ $(.ALLSRC) | |
38 | |
39 | |
1 | 40 .for i in $(TESTCASE_OBJS) |
41 ${i}: ${i:C/testcase-(.*).o/\1.c/} | |
42 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC) | |
43 .endfor | |
44 | |
45 testcase.o: testcase.c | |
46 $(CC) $(CFLAGS) -c $(.ALLSRC) | |
47 | |
78 | 48 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
|
49 $(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
|
50 |
399517bf65dc
Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents:
2
diff
changeset
|
51 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
|
52 $(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
|
53 |
1 | 54 clean: |
123
9e2316dc6ecb
Program completion events
Thinker K.F. Li <thinker@branda.to>
parents:
117
diff
changeset
|
55 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS) testcase; do \ |
1 | 56 echo "delete $$i"; \ |
57 rm -f $$i; \ | |
58 done | |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
59 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
60 depend: |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
15
diff
changeset
|
61 mkdep $(CFLAGS) $(SRCS) |