aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited 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}