comparison src/Makefile @ 2:31402929c587

Transform position
author Thinker K.F. Li <thinker@branda.to>
date Wed, 23 Jul 2008 16:07:37 +0800
parents b5c0162ccf69
children 399517bf65dc
comparison
equal deleted inserted replaced
1:b5c0162ccf69 2:31402929c587
1 SRCS = coord.c 1 SRCS = coord.c
2 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g} 2 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g}
3 CFLAGS=-I/usr/local/include 3 CFLAGS = -I/usr/local/include
4 BINS = testcase
4 5
5 all: testcase 6 all: $(BINS)
6 7
7 testcase: testcase.o $(TESTCASE_OBJS) 8 testcase: testcase.o $(TESTCASE_OBJS)
8 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit 9 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
9 10
10 .for i in $(TESTCASE_OBJS) 11 .for i in $(TESTCASE_OBJS)
14 15
15 testcase.o: testcase.c 16 testcase.o: testcase.c
16 $(CC) $(CFLAGS) -c $(.ALLSRC) 17 $(CC) $(CFLAGS) -c $(.ALLSRC)
17 18
18 clean: 19 clean:
19 for i in *.o *~$(BINS); do \ 20 for i in *.o *~ *.core $(BINS); do \
20 echo "delete $$i"; \ 21 echo "delete $$i"; \
21 rm -f $$i; \ 22 rm -f $$i; \
22 done 23 done