aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 2470f08..d0bc07c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,31 +3,31 @@
PREFIX = /usr
INITDIR = ${PREFIX}/lib/init
BINDIR = ${PREFIX}/bin
+CONFDIR = /etc/init
CC = cc
all: bin/shalt
-bin/shalt:
+bin/shalt: bin/shalt.c
${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
- sed 's#INITDIR#${INITDIR}#g' < rc.boot > ${DESTDIR}${INITDIR}/rc.boot
- sed 's#INITDIR#${INITDIR}#g' < rc.shutdown > ${DESTDIR}${INITDIR}/rc.shutdown
+ mkdir -p ${DESTDIR}${CONFDIR} ${DESTDIR}${INITDIR} ${DESTDIR}${BINDIR}
+ cp bin/shalt ${DESTDIR}${BINDIR}/shalt
+ chmod 755 ${DESTDIR}${BINDIR}/shalt
+ cp rc.lib rc.boot rc.shutdown ${DESTDIR}${INITDIR}
chmod 755 ${DESTDIR}${INITDIR}/rc.boot ${DESTDIR}${INITDIR}/rc.shutdown
- install -Dm644 README ${DESTDIR}${INITDIR}/README
+ cp rc.conf contrib/runit.boot contrib/getty.boot ${DESTDIR}${CONFDIR}
+ chmod 644 ${DESTDIR}${CONFDIR}/rc.conf ${DESTDIR}${CONFDIR}/runit.boot \
+ ${DESTDIR}${CONFDIR}/getty.boot
uninstall:
rm -f ${DESTDIR}${BINDIR}/shalt
- rm -f ${DESTDIR}/etc/init/rc.conf
- rm -f ${DESTDIR}/etc/init/getty.boot ${DESTDIR}/etc/init/runit.boot
+ rm -f ${DESTDIR}${CONFDIR}/rc.conf
+ rm -f ${DESTDIR}${CONFDIR}/getty.boot ${DESTDIR}${CONFDIR}/runit.boot
rm -f ${DESTDIR}${INITDIR}/rc.boot
rm -f ${DESTDIR}${INITDIR}/rc.shutdown
rm -f ${DESTDIR}${INITDIR}/rc.lib