comparison src/Makefile @ 5:9c331ec9e210

SVG path is partially supported
author Thinker K.F. Li <thinker@branda.to>
date Sat, 26 Jul 2008 01:37:35 +0800
parents 399517bf65dc
children 7cfecdce94cc
comparison
equal deleted inserted replaced
4:399517bf65dc 5:9c331ec9e210
1 SRCS = coord.c 1 SRCS = coord.c geo.c shape_path.c
2 OBJS = ${SRCS:C/(.*)\.c/\1.o/g}
2 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g} 3 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g}
3 CFLAGS = -I/usr/local/include 4 CFLAGS = -I/usr/local/include `pkg-config --cflags cairo`
5 LDFLAGS = `pkg-config --libs cairo`
4 BINS = testcase X_main 6 BINS = testcase X_main
5 7
6 all: $(BINS) 8 all: $(BINS)
7 9
8 testcase: testcase.o $(TESTCASE_OBJS) 10 testcase: testcase.o $(TESTCASE_OBJS)
14 .endfor 16 .endfor
15 17
16 testcase.o: testcase.c 18 testcase.o: testcase.c
17 $(CC) $(CFLAGS) -c $(.ALLSRC) 19 $(CC) $(CFLAGS) -c $(.ALLSRC)
18 20
19 X_main: X_main.o 21 X_main: X_main.o $(OBJS)
20 $(CC) $(CFALGS) `pkg-config --libs cairo` -o $@ $(.ALLSRC) 22 $(CC) $(CFALGS) `pkg-config --libs cairo` -o $@ $(.ALLSRC)
21 23
22 X_main.o: X_main.c 24 X_main.o: X_main.c
23 $(CC) $(CFLAGS) `pkg-config --cflags cairo` -c $(.ALLSRC) 25 $(CC) $(CFLAGS) `pkg-config --cflags cairo` -c $(.ALLSRC)
24 26
25 clean: 27 clean:
26 for i in *.o *~ *.core $(BINS); do \ 28 for i in *.o *~ *.core $(SHAPE_OBJS) $(BINS); do \
27 echo "delete $$i"; \ 29 echo "delete $$i"; \
28 rm -f $$i; \ 30 rm -f $$i; \
29 done 31 done