Fri, 16 Sep 2011 10:36:45 +0200
some minor fixes + makefile now injects revisionnumber into cline.h
CC = gcc BUILDDIR = build/ OBJ = $(shell ls | grep \.c | sed 's/^\([^.]*\)\.c/${BUILDDIR:/=\/}\1.o/g' | tr '\n' ' ') BIN = ${BUILDDIR}cline all: addrnum ${OBJ} remrnum ${CC} -o ${BIN} ${OBJ} addrnum: rm build/cline.o mv cline.h cline.src cat cline.src | sed "s/VERSION.*/VERSION=\"$(shell hg identify -i)\";/g" > cline.h remrnum: rm cline.h mv cline.src cline.h ${BUILDDIR}%.o: %.c mkdir -p ${BUILDDIR} ${CC} -c -std=c99 -o ${BUILDDIR}$*.o $< clean: rm build/*