aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-04-04 23:46:03 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-04-04 23:46:03 +0200
commite389fbbfeee4b750e2c41f15dfd320a104c1ed06 (patch)
tree920243fbae5755a60f94c547d4af10fd08aec6c5 /Makefile
parentf0d80cae93fc3916ccaf0482003cc162b7e6b15d (diff)
downloadlog-e389fbbfeee4b750e2c41f15dfd320a104c1ed06.tar.gz
log-e389fbbfeee4b750e2c41f15dfd320a104c1ed06.zip
Remove lib str from project
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 4 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 6d3cbda..494f29a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,5 @@
# See LICENSE file for copyright and license details.
-include libs.config.mk
-
CC = cc
SRC != find src -name "*.c"
OBJ = ${SRC:.c=.o}
@@ -9,16 +7,15 @@ OBJ = ${SRC:.c=.o}
LIBNAME = liblog
LIBVER = 0.0.0-a1
-CFLAGS = -Wall -ansi --std=c89 -pedantic ${OPT} ${LIBINC} -DLIBVER=\"${LIBVER}\"
-LDFLAGS = ${LIBS}
+CFLAGS = -Wall -ansi --std=c89 -pedantic ${OPT} -DLIBVER=\"${LIBVER}\"
dist: static shared
-static: libs
+static:
@make OPT='-O2 -pipe -Werror' ${LIBNAME:=.a}
rm -f ${OBJ}
-shared: libs
+shared:
@make OPT='-O2 -pipe -Werror -fPIC' ${LIBNAME:=.so}
rm -f ${OBJ}
@@ -29,21 +26,14 @@ ${LIBNAME:=.so}: ${OBJ}
${CC} ${LDFLAGS} -shared ${OBJ} -o $@
${LIBNAME:=.a}: ${OBJ}
-# ar rcs $@ ${OBJ}
- mkdir build
- cd build && ar -x ../${LIBSTR_PATH}
- ar rcs $@ ${OBJ} build/*
- rm -rf build
+ ar rcs $@ ${OBJ}
.c.o:
${CC} ${CFLAGS} -c $< -o $@
clean:
rm -f ${OBJ} ${LIBNAME}.* *.core
- rm -rf build
cd test && make clean
tests: dist
cd test && make clean tests
-
-include libs.target.mk