summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-30 13:34:16 -0400
committerJune McEnroe <june@causal.agency>2020-04-30 13:34:16 -0400
commitee25804606209d805997536cfc384e35c4712fbc (patch)
tree45ee927231bd17b874fb81b214cde9f32a949f8b /Makefile
parentWrap footer text in <small> (diff)
downloadbubger-ee25804606209d805997536cfc384e35c4712fbc.tar.gz
bubger-ee25804606209d805997536cfc384e35c4712fbc.zip
Add install, uninstall targets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b1db8d4..1ae3fb2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+PREFIX = /usr/local
+SHAREDIR = ${PREFIX}/share
+MANDIR = ${SHAREDIR}/man
+
 CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
 LDLIBS = -ltls
 
@@ -28,3 +32,13 @@ tags: *.c *.h
 
 clean:
 	rm -f bubger ${OBJS} tags
+
+install: bubger bubger.1 default.html
+	install -d ${PREFIX}/bin ${MANDIR}/man1 ${SHAREDIR}/bubger
+	install bubger ${PREFIX}/bin
+	gzip -c bubger.1 > ${MANDIR}/man1/bubger.1.gz
+	install -m 644 default.html ${SHAREDIR}/bubger
+
+uninstall:
+	rm -f ${PREFIX}/bin/bubger ${MANDIR}/man1/bubger.1.gz
+	rm -fr ${SHAREDIR}/bubger