comparison src/Makefile @ 1:b5c0162ccf69

Coordination tranforming
author Thinker K.F. Li <thinker@branda.to>
date Wed, 23 Jul 2008 13:57:33 +0800
parents
children 31402929c587
comparison
equal deleted inserted replaced
0:5aca939dbfbe 1:b5c0162ccf69
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