diff options
author | 2023-01-31 17:23:58 +0100 | |
---|---|---|
committer | 2023-01-31 17:23:58 +0100 | |
commit | dcb0210f2a1edaaf23cc8b11e86619eca2658d28 (patch) | |
tree | c4b42e96646f3b97a84dfd0dc225da200b40dac2 /Makefile | |
download | log-dcb0210f2a1edaaf23cc8b11e86619eca2658d28.tar.gz log-dcb0210f2a1edaaf23cc8b11e86619eca2658d28.zip |
Initial commit
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}.* |