Makefile@51b1ba3776b1
Makefile
Fri, 16 Sep 2011 09:59:20 +0200
- author
- Mike Becker <universe@uap-core.de>
- date
- Fri, 16 Sep 2011 09:59:20 +0200
- changeset 13
- 51b1ba3776b1
- parent 10
-
ecf787666f44
- child 14
-
ee9333c91dda
- permissions
- -rw-r--r--
changed makefile to auto-include any source file
CC = gcc
BUILDDIR = build/
OBJ = $(shell ls | grep \.c | sed 's/^\([^.]*\)\.c/${BUILDDIR:/=\/}\1.o/g' | tr '\n' ' ')
BIN = ${BUILDDIR}/cline
all: ${OBJ}
${CC} -o ${BIN} ${OBJ}
${BUILDDIR}%.o: %.c
mkdir -p ${BUILDDIR}
${CC} -c -std=c99 -o ${BUILDDIR}$*.o $<
clean:
rm build/*