From 7c9e77d1aaa136b03cfd23099572cd2d44d0eddc Mon Sep 17 00:00:00 2001 From: SEK1RO Date: Wed, 18 Sep 2024 11:45:49 +0300 Subject: [PATCH] fix(Makefile): -lLIB = -l:libbase.so / .a --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d76903d..988b6ee 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ endif ifneq (${SHARED}, false) CFLAGS += -Xlinker -rpath=${LIBDIR} +-lLIB = -l:lib${LIB}${-g}.so +else +-lLIB = -l:lib${LIB}${-g}.a endif SRCDIR = src @@ -100,7 +103,7 @@ ifneq (${TOOLS},) tools: library ${DIRS} ${patsubst %, ${BINDIR}/%${-g}, ${TOOLS}} ${BINDIR}/%${-g}: ${SRCDIR}/%.cpp ${patsubst %, ${OBJDIR}/%${-g}.o, ${OBJS}} - ${CC} -o $@ $< -I${INCDIR} -L${LIBDIR} ${-l} -l${LIB}${-g} ${CFLAGS} + ${CC} -o $@ $< -I${INCDIR} -L${LIBDIR} ${-l} ${-lLIB} ${CFLAGS} ${USRBIN}/%${-g}: ${BINDIR}/%${-g} install -Dm755 $< $@ @@ -112,7 +115,7 @@ tests: library ${DIRS} ${patsubst %, ${BINDIR}/%${-g}, ${TESTS}} ${patsubst %, ./${BINDIR}/%${-g};, ${TESTS}} ${BINDIR}/%${-g}: ${TESTDIR}/%.cpp ${patsubst %, ${OBJDIR}/%${-g}.o, ${OBJS}} - ${CC} -o $@ $< -I${INCDIR} -L${LIBDIR} ${-l} -l${LIB}${-g} -lgtest ${CFLAGS} + ${CC} -o $@ $< -I${INCDIR} -L${LIBDIR} ${-l} ${-lLIB} -lgtest ${CFLAGS} endif