about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index a37a40f..6454448 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,18 @@
+UNAME != uname
+
 PREFIX ?= /usr/local
-MANDIR ?= ${PREFIX}/share/man
-ETCDIR ?= ${PREFIX}/etc
+MANDIR ?= ${PREFIX}/man
 RUNDIR ?= /var/run
+.if ${UNAME} == OpenBSD
+ETCDIR ?= /etc
+.else
+ETCDIR ?= ${PREFIX}/etc
+.endif
 
 CFLAGS += -std=c99 -Wall -Wextra -Wpedantic
 CFLAGS += -D'ETCDIR="${ETCDIR}"' -D'RUNDIR="${RUNDIR}"'
 
-RC = FreeBSD/catsitd
+RC_SCRIPT = ${UNAME}/catsitd
 
 -include config.mk
 
@@ -35,13 +41,13 @@ tags: *.c *.h
 	sed -e 's|%%PREFIX%%|${PREFIX}|g' $< > $@
 
 clean:
-	rm -f ${BINS} ${OBJS} ${RC} tags
+	rm -f ${BINS} ${OBJS} ${RC_SCRIPT} tags
 
-install: ${BINS} ${RC} ${MAN5} ${MAN8}
+install: ${BINS} ${RC_SCRIPT} ${MAN5} ${MAN8}
 	install -d ${DESTDIR}${PREFIX}/sbin ${DESTDIR}${ETCDIR}/rc.d
 	install -d ${DESTDIR}${MANDIR}/man5 ${DESTDIR}${MANDIR}/man8
 	install ${BINS} ${DESTDIR}${PREFIX}/sbin
-	install ${RC} ${DESTDIR}${ETCDIR}/rc.d
+	install ${RC_SCRIPT} ${DESTDIR}${ETCDIR}/rc.d
 	install -m 644 ${MAN5} ${DESTDIR}${MANDIR}/man5
 	install -m 644 ${MAN8} ${DESTDIR}${MANDIR}/man8
 
@@ -49,4 +55,4 @@ uninstall:
 	rm -f ${BINS:%=${DESTDIR}${PREFIX}/sbin/%}
 	rm -f ${MAN5:%=${DESTDIR}${MANDIR}/man5/%}
 	rm -f ${MAN8:%=${DESTDIR}${MANDIR}/man8/%}
-	rm -f ${DESTDIR}${ETCDIR}/rc.d/catsitd
+	rm -f ${DESTDIR}${ETCDIR}/rc.d/${RC_SCRIPT:T}
le='2017-05-01 16:11:20 -0400'>2017-05-01Rename colorscheme "trivial"June McEnroe 2017-05-01Update vendored pathogenJune McEnroe 2017-05-01Clean up git configJune McEnroe 2017-05-01Clean up style in xxJune McEnroe 2017-05-01Clean up style in pbdJune McEnroe 2017-05-01Use EX_OK in pbcopyJune McEnroe 2017-04-30Clean up clockJune McEnroe 2017-04-30Clean up error strings in briJune McEnroe 2017-03-18Add -u option to xxJune McEnroe 2017-03-15Fix non-string-literal-format-string in briJune McEnroe 2017-03-15Fix bri compilationJune McEnroe cc will remove the file itself just fine. Always exit in case any of the shell commands fail. 2017-03-15Use psvar for title settingJune McEnroe Prevents prompt expansion from happening on the command being run when it is set in the title. 2017-03-14Add bri brightness control scriptJune McEnroe This is probably terrible. 2017-03-14Add comment to tmux terminal overrideJune McEnroe 2017-03-13Have tmux set block cursor on linux consoleJune McEnroe 2017-03-13Use inverse for Visual in colorschemeJune McEnroe