1
|
1 SRCS = coord.c
|
|
2 TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g}
|
|
3 CFLAGS=-I/usr/local/include
|
|
4
|
|
5 all: testcase
|
|
6
|
|
7 testcase: testcase.o $(TESTCASE_OBJS)
|
|
8 $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit
|
|
9
|
|
10 .for i in $(TESTCASE_OBJS)
|
|
11 ${i}: ${i:C/testcase-(.*).o/\1.c/}
|
|
12 $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC)
|
|
13 .endfor
|
|
14
|
|
15 testcase.o: testcase.c
|
|
16 $(CC) $(CFLAGS) -c $(.ALLSRC)
|
|
17
|
|
18 clean:
|
|
19 for i in *.o *~$(BINS); do \
|
|
20 echo "delete $$i"; \
|
|
21 rm -f $$i; \
|
|
22 done
|