summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile25
1 files changed, 14 insertions, 11 deletions
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