annotate src/Makefile.pmake @ 1324:740b3239030e

Clear dup group before running animation. User may change content of groups. TweenObject would not aware the changes if we don't clear the dup group before running animation.
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 30 Jan 2011 20:03:21 +0800
parents 586e50f82c1f
children
rev   line source
822
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 257
diff changeset
1 # -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 257
diff changeset
2 # vim: sw=4:ts=8:sts=4
33
d82749f77108 Fix bug of demo and remove *_fill() and *_stroke().
Thinker K.F. Li <thinker@branda.to>
parents: 30
diff changeset
3 SRCS = coord.c geo.c shape_path.c shape_text.c shape_rect.c \
257
50d253d0fcba Simple image loader and image shape.
Thinker K.F. Li <thinker@branda.to>
parents: 235
diff changeset
4 shape_image.c \
73
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 41
diff changeset
5 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
6 X_supp.c timertool.c tools.c shift.c chgcolor.c \
257
50d253d0fcba Simple image loader and image shape.
Thinker K.F. Li <thinker@branda.to>
parents: 235
diff changeset
7 visibility.c rotate.c prop.c mouse.c img_ldr.c
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
8 OBJS = ${SRCS:C/(.*)\.c/\1.o/g}
235
65cabbdd5284 termporary revision
Thinker K.F. Li <thinker@branda.to>
parents: 224
diff changeset
9 TESTCASE_SRCS = ${SRCS:C/X_supp\.c//}
65cabbdd5284 termporary revision
Thinker K.F. Li <thinker@branda.to>
parents: 224
diff changeset
10 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
11 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
12 `pkg-config --cflags cairo`
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
13 LDFLAGS = `pkg-config --libs cairo`
108
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
14 BINS = libmbfly.a X_main
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
15 PREFIX?=/usr/local/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
16 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
17 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
18 MKDIR?= mkdir -p
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
20 all: $(BINS)
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21
108
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
22 install: $(BINS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
23 $(INSTALL) -d ${PREFIX}include/mb
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
24 .for i in $(HEADERS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
25 $(INSTALL) -o root -m 0644 ${i} ${PREFIX}include/mb/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
26 .endfor
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
27 $(INSTALL) -o root libmbfly.a ${PREFIX}lib/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
28
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
29 uninstall:
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
30 .for i in $(HEADERS)
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
31 rm -f ${PREFIX}include/mb/${i}
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
32 .endfor
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
33 rm -f ${PREFIX}lib/libmbfly.a
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
34 rmdir ${PREFIX}include/mb/
565b55508c8d More dox
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
35
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
36 testcase: testcase.o $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
37 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
38
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
39 libmbfly.a: $(OBJS)
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
40 $(AR) -cr $@ $(.ALLSRC)
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
41
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
42
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
43 .for i in $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
44 ${i}: ${i:C/testcase-(.*).o/\1.c/}
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
45 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
46 .endfor
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
47
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
48 testcase.o: testcase.c
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
49 $(CC) $(CFLAGS) -c $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
50
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
51 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
52 $(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
53
399517bf65dc Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents: 2
diff changeset
54 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
55 $(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
56
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
57 clean:
123
9e2316dc6ecb Program completion events
Thinker K.F. Li <thinker@branda.to>
parents: 117
diff changeset
58 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS) testcase; do \
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
59 echo "delete $$i"; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
60 rm -f $$i; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
61 done
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
62
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
63 depend:
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
64 mkdep $(CFLAGS) $(SRCS)