From 0a8b0bedea5df1ff892e5ca5c71578239e2bf781 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 2 May 2021 13:37:36 -0400 Subject: Only link litterbox with -ltls --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f0f7e75..bea16f6 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,18 @@ MANDIR ?= ${PREFIX}/share/man ETCDIR ?= ${PREFIX}/etc CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -LDLIBS = -lsqlite3 -ltls +LDADD.sqlite3 = -lsqlite3 +LDADD.libtls = -ltls BINS = litterbox scoop unscoop MANS = ${BINS:=.1} -include config.mk +LDLIBS.litterbox = ${LDADD.sqlite3} ${LDADD.libtls} +LDLIBS.scoop = ${LDADD.sqlite3} +LDLIBS.unscoop = ${LDADD.sqlite3} + OBJS.litterbox = litterbox.o config.o xdg.o OBJS.scoop = scoop.o xdg.o OBJS.unscoop = unscoop.o xdg.o @@ -27,8 +32,8 @@ scoop: ${OBJS.scoop} unscoop: ${OBJS.unscoop} -.o: - ${CC} ${LDFLAGS} ${OBJS.$@} ${LDLIBS} -o $@ +${BINS}: + ${CC} ${LDFLAGS} ${OBJS.$@} ${LDLIBS.$@} -o $@ ${OBJS}: database.h -- cgit 1.4.1