diff options
author | 2023-04-04 23:46:03 +0200 | |
---|---|---|
committer | 2023-04-04 23:46:03 +0200 | |
commit | e389fbbfeee4b750e2c41f15dfd320a104c1ed06 (patch) | |
tree | 920243fbae5755a60f94c547d4af10fd08aec6c5 | |
parent | f0d80cae93fc3916ccaf0482003cc162b7e6b15d (diff) | |
download | log-e389fbbfeee4b750e2c41f15dfd320a104c1ed06.tar.gz log-e389fbbfeee4b750e2c41f15dfd320a104c1ed06.zip |
Remove lib str from project
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | libs.config.mk | 13 | ||||
-rw-r--r-- | libs.target.mk | 13 |
3 files changed, 4 insertions, 40 deletions
@@ -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 |