aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-02-01 19:24:08 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-02-01 19:24:08 +0100
commite91664dfbd02bdbdf14c90e1fa1b30d85682e6b6 (patch)
tree1ceab711531fb5e844999cf30591713b4c53f4c0
parentdcb0210f2a1edaaf23cc8b11e86619eca2658d28 (diff)
downloadlog-e91664dfbd02bdbdf14c90e1fa1b30d85682e6b6.tar.gz
log-e91664dfbd02bdbdf14c90e1fa1b30d85682e6b6.zip
Add new targets to Makefile
-rw-r--r--Makefile10
1 files 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}