Mon, 19 Sep 2011 08:11:08 +0200
added license
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/*