From 28a27a2c0fdbd05328a4c30fbb63a4e3c6e12432 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 12 Feb 2022 20:19:18 -0500 Subject: [PATCH] Move sandman build to scripts/Makefile --- Makefile | 11 ----------- README.7 | 6 +++--- scripts/Makefile | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 scripts/Makefile 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