diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..54c3676 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +# See LICENSE file for copyright and license details. + +CC = cc +SRC != find * -name '*.c' +OBJ = ${SRC:.c=.o} + +LIBNAME = liblog + +CFLAGS = -O2 -pipe -Wall -Werror --std=c89 -ansi +LDFLAGS = + +${LIBNAME:=.so}: ${OBJ} + ${CC} ${LDFLAGS} -shared ${OBJ} -o $@ + +${LIBNAME:=.a}: ${OBJ} + ar rcs $@ ${OBJ} + +.c.o: + ${CC} ${CFLAGS} -c $< + +all: ${LIBNAME:=.so} ${LIBNAME:=.a} + +clean: + rm -f *.o ${LIBNAME}.* |