aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-03-24 17:11:52 +0300
committerCem Keylan <cem@ckyln.com>2020-03-24 17:11:52 +0300
commitce8eaba8581ebbb56242cc2ee73c72a928e59a99 (patch)
tree0a1852fae97e02c4b21eb4c00fe4d4ac4809070f /Makefile
parent2c4040656293a1e969bb01216ef2b3d5c26f225c (diff)
downloadinit-ce8eaba8581ebbb56242cc2ee73c72a928e59a99.tar.gz
add simple halt utility0.7.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9a933be..9f34284 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,20 @@
PREFIX = /usr
INITDIR = ${PREFIX}/lib/init
+BINDIR = ${PREFIX}/bin
+CC = cc
-install:
+all: bin/shalt
+
+bin/shalt:
+ ${CC} -o bin/shalt bin/shalt.c
+
+clean:
+ rm -f bin/shalt
+
+install: bin/shalt
mkdir -p ${DESTDIR}/etc
+ install -Dm755 -t ${DESTDIR}${BINDIR} bin/shalt
install -Dm644 rc.conf ${DESTDIR}/etc/init/rc.conf
install -Dm644 rc.lib ${DESTDIR}${INITDIR}/rc.lib
install -Dm644 -t ${DESTDIR}/etc/init/ contrib/getty.boot contrib/runit.boot
@@ -15,6 +26,7 @@ install:
install -Dm644 README ${DESTDIR}${INITDIR}/README
uninstall:
+ rm -f ${DESTDIR}${BINDIR}/shalt
rm -f ${DESTDIR}/etc/init/rc.conf
rm -f ${DESTDIR}/etc/init/rc.local
rm -f ${DESTDIR}/etc/init/getty.boot ${DESTDIR}/etc/init/runit.boot
@@ -22,3 +34,6 @@ uninstall:
rm -f ${DESTDIR}${INITDIR}/rc.shutdown
rm -f ${DESTDIR}${INITDIR}/rc.lib
rm -f ${DESTDIR}${INITDIR}/README
+
+
+.PHONY: all clean install uninstall