Commit Diff


commit - 60a06cd190b8e18b61fc37982afdba6eeca07ef3
commit + 50b933ec236014efa062515dc8275c4984deaa04
blob - ed8093525e3f5a7c63fea79aab41c92865eb63f1
blob + 507d08ff493fa7ec6eab111a52a248ad048585a2
--- Makefile
+++ Makefile
@@ -1,19 +1,24 @@
-# yabitrot - yet another bit rottion scanner
+# yabitrot - yet another bit rotation scanner
 #
+# See the LICENSE file for copyright and license details.
+.POSIX:
 
-# Customize below to fit your system
-# paths
-PREFIX = /usr/local
+BIN    = yabitrot
+PREFIX ?= /usr
+BINDIR ?= ${PREFIX}/bin
+MANDIR ?= ${PREFIX}/share/man
 
+
 install:
-	@echo == Installing executable file to ${DESTDIR}${PREFIX}/bin ==
-	install -d ${DESTDIR}${PREFIX}/bin
-	install yabitrot ${DESTDIR}${PREFIX}/bin
+	@echo installing executable to "${DESTDIR}${PREFIX}/bin"
+	@install "${BIN}" "${DESTDIR}${BINDIR}/${BIN}"
+	@echo installing manual page to ${DESTDIR}${MANDIR}/man1
+	@install "${BIN}.1" "${DESTDIR}${MANDIR}/man1/${BIN}.1"
 
-
 uninstall:
-	@echo == Removing executable file from ${DESTDIR}${PREFIX}/bin ==
-	rm -f ${DESTDIR}${PREFIX}/bin/yabitrot
+	@echo removing executable file from "${DESTDIR}${PREFIX}/bin"
+	@rm -f "${DESTDIR}${BINDIR}/${BIN}"
+	@echo removing manual page from ${DESTDIR}${MANDIR}/man1
+	@rm -f ${DESTDIR}${MANDIR}/man1/${BIN}.1
 
 .PHONY: install uninstall
-