Mercurial > MadButterfly
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Makefile Wed Jul 23 13:57:33 2008 +0800 @@ -0,0 +1,22 @@ +SRCS = coord.c +TESTCASE_OBJS = ${SRCS:C/(.*)\.c/testcase-\1.o/g} +CFLAGS=-I/usr/local/include + +all: testcase + +testcase: testcase.o $(TESTCASE_OBJS) + $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) -L/usr/local/lib -lcunit + +.for i in $(TESTCASE_OBJS) +${i}: ${i:C/testcase-(.*).o/\1.c/} + $(CC) $(CFLAGS) -DUNITTEST -g -c -o $@ $(.ALLSRC) +.endfor + +testcase.o: testcase.c + $(CC) $(CFLAGS) -c $(.ALLSRC) + +clean: + for i in *.o *~$(BINS); do \ + echo "delete $$i"; \ + rm -f $$i; \ + done