diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile index 309dd8f..b358a82 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PREFIX = /usr/local MANDIR = ${PREFIX}/share/man +ETCDIR = ${PREFIX}/etc LIBS_PREFIX = /usr/local CFLAGS += -std=c11 -Wall -Wextra -Wpedantic @@ -10,6 +11,7 @@ LDLIBS_litterbox = -ltls BINS = litterbox scoop unscoop MANS = ${BINS:=.1} +RCS = rc.d/litterbox -include config.mk @@ -37,6 +39,9 @@ install: ${BINS} ${MANS} install -d ${PREFIX}/bin ${MANDIR}/man1 install ${BINS} ${PREFIX}/bin for man in ${MANS}; do gzip -c $$man > ${MANDIR}/man1/$$man.gz; done + if [ -n '${RCS}' ]; then install -d ${ETCDIR}/rc.d; fi + if [ -n '${RCS}' ]; then install ${RCS} ${ETCDIR}/rc.d; fi uninstall: rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%.gz} + if [ -n '${RCS}' ]; then rm -f ${RCS:%=${ETCDIR}/%}; fi |