annotate src/Makefile @ 123:9e2316dc6ecb

Program completion events
author Thinker K.F. Li <thinker@branda.to>
date Tue, 16 Sep 2008 14:19:26 +0800
parents e4e47d2cdbcd
children
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 \
117
Thinker K.F. Li <thinker@branda.to>
parents: 116
diff changeset
4 visibility.c rotate.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}
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 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
7 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
8 LDFLAGS = `pkg-config --libs cairo`
108
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
9 BINS = libmbfly.a X_main
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
10 PREFIX?=/usr/local/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
11 HEADERS= X_supp.h animate.h mb.h mb_timer.h mb_types.h \
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
12 observer.h paint.h redraw_man.h shapes.h tools.h
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
13 MKDIR?= mkdir -p
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
15 all: $(BINS)
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16
108
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
17 install: $(BINS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
18 $(INSTALL) -d ${PREFIX}include/mb
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
19 .for i in $(HEADERS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
20 $(INSTALL) -o root -m 0644 ${i} ${PREFIX}include/mb/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
21 .endfor
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
22 $(INSTALL) -o root libmbfly.a ${PREFIX}lib/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
23
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
24 uninstall:
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
25 .for i in $(HEADERS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
26 rm -f ${PREFIX}include/mb/${i}
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
27 .endfor
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
28 rm -f ${PREFIX}lib/libmbfly.a
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
29 rmdir ${PREFIX}include/mb/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
30
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
31 testcase: testcase.o $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
32 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
34 libmbfly.a: $(OBJS)
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
35 $(AR) -cr $@ $(.ALLSRC)
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
36
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
37
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
38 .for i in $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
39 ${i}: ${i:C/testcase-(.*).o/\1.c/}
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
40 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
41 .endfor
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
42
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
43 testcase.o: testcase.c
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
44 $(CC) $(CFLAGS) -c $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
45
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
46 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
47 $(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
48
399517bf65dc Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents: 2
diff changeset
49 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
50 $(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
51
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
52 clean:
123
9e2316dc6ecb Program completion events
Thinker K.F. Li <thinker@branda.to>
parents: 117
diff changeset
53 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS) testcase; do \
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
54 echo "delete $$i"; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
55 rm -f $$i; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
56 done
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
57
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
58 depend:
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
59 mkdep $(CFLAGS) $(SRCS)