From e389fbbfeee4b750e2c41f15dfd320a104c1ed06 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 4 Apr 2023 23:46:03 +0200 Subject: Remove lib str from project --- Makefile | 18 ++++-------------- libs.config.mk | 13 ------------- libs.target.mk | 13 ------------- 3 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 libs.config.mk delete mode 100644 libs.target.mk 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 diff --git a/libs.config.mk b/libs.config.mk deleted file mode 100644 index 8854860..0000000 --- a/libs.config.mk +++ /dev/null @@ -1,13 +0,0 @@ -# See LICENSE file for copyright and license details. - -LIBDIR = lib - -LIBSTR_VER = 0.0.0-a1 -LIBSTR = cstr-${LIBSTR_VER} -LIBSTR_INC = -I${LIBDIR}/${LIBSTR}/src -LIBSTR_LIB = -L${LIBDIR}/${LIBSTR} -l:libstr.a -LIBSTR_PATH = ${LIBDIR}/${LIBSTR}/libstr.a - -LIBINC = ${LIBSTR_INC} -LIBS = ${LIBSTR_LIB} -LIBSPATH = ${LIBSTR_PATH} diff --git a/libs.target.mk b/libs.target.mk deleted file mode 100644 index fa300e3..0000000 --- a/libs.target.mk +++ /dev/null @@ -1,13 +0,0 @@ -# See LICENSE file for copyright and license details. - -clean-libs: - rm -rf ${LIBDIR} - -libs: ${LIBDIR} ${LIBDIR}/${LIBSTR} - -${LIBDIR}: - @mkdir -p $@ - -${LIBDIR}/${LIBSTR}: - fetch -o - https://git.alessandroiezzi.it/libs/c/cstr.git/snapshot/${LIBSTR}.tar.gz | tar xzf - -C ${LIBDIR} - cd $@ && make -- cgit v1.2.3