summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a7ba555..eae91ce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+PREFIX = /usr/local
+MANDIR = ${PREFIX}/share/man
 LIBS_PREFIX = /usr/local
 
 CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
@@ -7,6 +9,7 @@ LDLIBS = -lsqlite3
 LDLIBS_litterbox = -ltls
 
 BINS = litterbox scoop unscoop
+MANS = ${BINS:=.1}
 
 -include config.mk
 
@@ -24,3 +27,11 @@ tags: *.c *.h
 
 clean:
 	rm -f tags ${BINS} ${BINS:=.o}
+
+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
+
+uninstall:
+	rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%.gz}
mmit/bin/title.c?id=615869edabec042fdcd960f17cdc7b6fc39b11a2&follow=1'>Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe