Thu, 20 Oct 2011 14:13:56 +0200
Changed author comments + added signatures for upcomming bfile heuristics
1 CC = gcc
2 CARG = -Wall -std=gnu99
3 BUILDDIR = build/
4 OBJ = $(shell ls | grep '\.c' | sed 's/^\([^.]*\)\.c$$/${BUILDDIR:/=\/}\1.o/g' | tr '\n' ' ')
5 BIN = ${BUILDDIR}cline
7 .PHONY: setup run-compile teardown
9 all: setup run-compile teardown
12 run-compile:
13 -${MAKE} compile
15 compile: ${OBJ}
16 ${CC} -o ${BIN} ${OBJ}
18 setup:
19 mkdir -p ${BUILDDIR}
20 rm -f build/cline.o
21 mv cline.h cline.src
22 cat cline.src | sed "s/VERSION.*/VERSION=\"$(shell hg identify -n) ($(shell hg identify -i))\";/g" > cline.h
24 teardown:
25 rm -f cline.h
26 mv cline.src cline.h
28 ${BUILDDIR}%.o: %.c
29 ${CC} ${CARG} -c -o ${BUILDDIR}$*.o $<
31 clean:
32 rm -f build/*