From e91664dfbd02bdbdf14c90e1fa1b30d85682e6b6 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 1 Feb 2023 19:24:08 +0100 Subject: Add new targets to Makefile --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 54c3676..7d154e4 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,17 @@ # See LICENSE file for copyright and license details. CC = cc -SRC != find * -name '*.c' +SRC = log.c OBJ = ${SRC:.c=.o} LIBNAME = liblog -CFLAGS = -O2 -pipe -Wall -Werror --std=c89 -ansi +#CFLAGS = -O2 -pipe -Wall -Werror --std=c89 -ansi -pedantic -fPIC +CFLAGS = -O2 -pipe --std=c89 -ansi -pedantic -fPIC LDFLAGS = ${LIBNAME:=.so}: ${OBJ} - ${CC} ${LDFLAGS} -shared ${OBJ} -o $@ + ${CC} ${LDFLAGS} -fPIC -shared ${OBJ} -o $@ ${LIBNAME:=.a}: ${OBJ} ar rcs $@ ${OBJ} @@ -22,3 +23,6 @@ all: ${LIBNAME:=.so} ${LIBNAME:=.a} clean: rm -f *.o ${LIBNAME}.* + +test-app: main.o ${OBJ} + ${CC} ${LDFLAGS} -o $@ main.o ${OBJ} -- cgit v1.2.3