summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-12 20:19:18 -0500
committerJune McEnroe <june@causal.agency>2022-02-12 20:19:18 -0500
commit28a27a2c0fdbd05328a4c30fbb63a4e3c6e12432 (patch)
tree9271c7b8cedb29cd3ff934f886b23459292b498a
parentUse compat_readpassphrase.c on Linux (diff)
downloadcatgirl-28a27a2c0fdbd05328a4c30fbb63a4e3c6e12432.tar.gz
catgirl-28a27a2c0fdbd05328a4c30fbb63a4e3c6e12432.zip
Move sandman build to scripts/Makefile
Diffstat (limited to '')
-rw-r--r--Makefile11
-rw-r--r--README.76
-rw-r--r--scripts/Makefile22
3 files changed, 25 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 48fc350..83ead95 100644
--- a/Makefile
+++ b/Makefile
@@ -48,17 +48,6 @@ install: catgirl catgirl.1
 uninstall:
 	rm -f ${DESTDIR}${BINDIR}/catgirl ${DESTDIR}${MANDIR}/man1/catgirl.1
 
-scripts/sandman: scripts/sandman.o
-	${CC} ${LDFLAGS} scripts/sandman.o -framework Cocoa -o $@
-
-install-sandman: scripts/sandman scripts/sandman.1
-	install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
-	install scripts/sandman ${DESTDIR}${BINDIR}
-	install -m 644 scripts/sandman.1 ${DESTDIR}${MANDIR}/man1
-
-uninstall-sandman:
-	rm -f ${DESTDIR}${BINDIR}/sandman ${DESTDIR}${MANDIR}/man1/sandman.1
-
 CHROOT_USER = chat
 CHROOT_GROUP = ${CHROOT_USER}
 
diff --git a/README.7 b/README.7
index 5a614e8..8f13f7c 100644
--- a/README.7
+++ b/README.7
@@ -1,5 +1,5 @@
 .\" To view this file, run: man ./README.7
-.Dd June 28, 2021
+.Dd February 12, 2022
 .Dt README 7
 .Os "Causal Agency"
 .
@@ -167,8 +167,8 @@ to stop and start
 on system sleep and wake.
 Install it as follows:
 .Bd -literal -offset indent
-$ make scripts/sandman
-# make install-sandman
+$ make -C scripts sandman
+# make -C scripts install
 .Ed
 .
 .Sh FILES
diff --git a/scripts/Makefile b/scripts/Makefile
new file mode 100644
index 0000000..179a2d3
--- /dev/null
+++ b/scripts/Makefile
@@ -0,0 +1,22 @@
+PREFIX ?= /usr/local
+BINDIR ?= ${PREFIX}/bin
+MANDIR ?= ${PREFIX}/man
+
+CFLAGS += -Wall -Wextra
+
+-include ../config.mk
+
+LDLIBS = -framework Cocoa
+
+all: sandman
+
+clean:
+	rm -f sandman
+
+install: sandman sandman.1
+	install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
+	install sandman ${DESTDIR}${BINDIR}
+	install -m 644 sandman.1 ${DESTDIR}${MANDIR}/man1
+
+uninstall:
+	rm -f ${DESTDIR}${BINDIR}/sandman ${DESTDIR}/man/man1/sandman.1