--- a/Makefile Mon May 30 08:45:08 2011 +0200 +++ b/Makefile Thu Sep 15 13:29:06 2011 +0200 @@ -1,11 +1,14 @@ CC = gcc -OBJ = cline.o functions.o +BUILDDIR = build +OBJ = ${BUILDDIR}/cline.o ${BUILDDIR}/scanner.o ${BUILDDIR}/settings.o ${BUILDDIR}/suffix_fnc.o ${BUILDDIR}/suffix_list.o ${BUILDDIR}/arguments.o +BIN = ${BUILDDIR}/cline -cline: ${OBJ} - ${CC} -o cline ${OBJ} +all: ${OBJ} + ${CC} -o ${BIN} ${OBJ} -%.o: %.c - ${CC} -c -std=c99 $< +${BUILDDIR}/%.o: %.c + mkdir -p ${BUILDDIR} + ${CC} -c -std=c99 -o ${BUILDDIR}/$*.o $< clean: - rm *.o + rm build/*