annotate src/Makefile @ 10:7cfecdce94cc

Remove warning messages
author Thinker K.F. Li <thinker@branda.to>
date Sat, 26 Jul 2008 05:32:31 +0800
parents 9c331ec9e210
children 79e9edf4c00a
rev   line source
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
1 SRCS = coord.c geo.c shape_path.c
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
2 OBJS = ${SRCS:C/(.*)\.c/\1.o/g}
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g}
10
7cfecdce94cc Remove warning messages
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
4 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
5 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
6 BINS = testcase X_main
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
8 all: $(BINS)
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 testcase: testcase.o $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 .for i in $(TESTCASE_OBJS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14 ${i}: ${i:C/testcase-(.*).o/\1.c/}
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 .endfor
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 testcase.o: testcase.c
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19 $(CC) $(CFLAGS) -c $(.ALLSRC)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
21 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
22 $(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
23
399517bf65dc Add rules for X_main to Makefile
Thinker K.F. Li <thinker@branda.to>
parents: 2
diff changeset
24 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
25 $(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
26
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
27 clean:
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 4
diff changeset
28 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS); do \
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
29 echo "delete $$i"; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
30 rm -f $$i; \
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
31 done