From 02b69fbe4f74c0faa0f09cc762762f3c34149201 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 8 Oct 2023 15:38:04 -0400 Subject: Clean things up somewhat --- Makefile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d6a8580..c8dd28b 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,26 @@ PREFIX ?= /usr/local MANDIR ?= ${PREFIX}/man +RCDIR ?= /etc/rc.d CFLAGS += -std=c11 -Wall -Wextra -all: kitd rc +all: kitd rc_script -rc: rc.in - sed 's|%%PREFIX%%|${PREFIX}|g' rc.in >rc +rc_script: rc_script.in + sed 's|%%PREFIX%%|${PREFIX}|g' rc_script.in >rc_script clean: - rm -f kitd rc + rm -f kitd rc_script -install: kitd kitd.8 rc - install -d ${DESTDIR}${PREFIX}/sbin ${DESTDIR}${MANDIR}/man8 - install -d ${DESTDIR}/etc/rc.d - install kitd ${DESTDIR}${PREFIX}/sbin - install -m 644 kitd.8 ${DESTDIR}${MANDIR}/man8 - install rc ${DESTDIR}/etc/rc.d/kitd +install: kitd kitd.8 rc_script + install -d ${DESTDIR}${PREFIX}/sbin + install -d ${DESTDIR}${MANDIR}/man8 + install -d ${DESTDIR}${RCDIR} + install kitd ${DESTDIR}${PREFIX}/sbin/kitd + install -m 644 kitd.8 ${DESTDIR}${MANDIR}/man8/kitd.8 + install rc_script ${DESTDIR}${RCDIR}/kitd uninstall: - rm -f ${DESTDIR}${PREFIX}/sbin/kitd ${DESTDIR}${MANDIR}/man8/kitd.8 + rm -f ${DESTDIR}${PREFIX}/sbin/kitd + rm -f ${DESTDIR}${MANDIR}/man8/kitd.8 rm -f ${DESTDIR}/etc/rc.d/kitd -- cgit 1.4.1