From dcb0210f2a1edaaf23cc8b11e86619eca2658d28 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 31 Jan 2023 17:23:58 +0100 Subject: Initial commit --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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}.* -- cgit v1.2.3