about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-05-02 13:37:36 -0400
committerJune McEnroe <june@causal.agency>2021-05-02 13:50:35 -0400
commit0a8b0bedea5df1ff892e5ca5c71578239e2bf781 (patch)
tree24f820825ab9f35613bdacb11ee3d9c1e65cf21e /Makefile
parentMatch multiple types with -t (diff)
downloadlitterbox-0a8b0bedea5df1ff892e5ca5c71578239e2bf781.tar.gz
litterbox-0a8b0bedea5df1ff892e5ca5c71578239e2bf781.zip
Only link litterbox with -ltls
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
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
 
logmsg'> I'm expecting to also have an OpenBSD rc script. 2020-08-15Call setproctitle with number of servicesJune McEnroe 2020-08-15Rename project to catsitJune McEnroe 2020-08-15Use only LOG_NOTICE and LOG_WARNINGJune McEnroe These are the two priorities that go to a normal place (/var/log/messages) by default. 2020-08-15Make log messages consistentJune McEnroe 2020-08-15Remove closelog callJune McEnroe It's unclear whether closelog is really safe to call in pre-exec context, so just trust that the log is opened with CLOEXEC. 2020-08-15Implement service statusJune McEnroe 2020-08-15Parse control commandsJune McEnroe 2020-08-15Read service pipesJune McEnroe Changed line reading functions to return const char * because modifying the strings by adding '\0' into them screws up the following call. 2020-08-15Implement non-blocking line-buffered readingJune McEnroe 2020-08-15Generate tags fileJune McEnroe 2020-08-15Just use CLOCK_MONOTONIC and clean up includesJune McEnroe CLOCK_MONOTONIC exists everywhere. 2020-08-15Reap childrenJune McEnroe 2020-08-14Implement serviceSignal, serviceStop, serviceRestartJune McEnroe 2020-08-14Reset restartInterval and restartDeadline on startJune McEnroe 2020-08-14Switch to timespec for timeoutsJune McEnroe Can be passed to ppoll(2) directly. 2020-08-14Implement serviceStartJune McEnroe 2020-08-14Flesh out Service structJune McEnroe 2020-08-14Build environment for servicesJune McEnroe 2020-08-14Implement spawntab parsingJune McEnroe 2020-08-14Open syslog, daemonize, write PIDJune McEnroe 2020-08-14Implement user and group lookupJune McEnroe 2020-08-14Add install targetJune McEnroe 2020-08-14Add spawnd skeletonJune McEnroe