about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-09 16:44:39 -0400
committerJune McEnroe <june@causal.agency>2020-07-09 16:44:39 -0400
commit0aae05ac4a32c19ea14b512e4ea2ee339d5b096d (patch)
treed0d788b90ce6cda06bc2b63d20866e6dabe7acf4 /Makefile
parentAdd compatibility for kcgi <0.12 (diff)
downloadscooper-0aae05ac4a32c19ea14b512e4ea2ee339d5b096d.tar.gz
scooper-0aae05ac4a32c19ea14b512e4ea2ee339d5b096d.zip
Add configure script and install target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ce4cdcf..94ca089 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,20 @@
+PREFIX ?= ~/.local
+MANDIR ?= ${PREFIX}/share/man
+
 CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
-LDLIBS = -lsqlite3 -lkcgi -lkcgihtml -lz
+LDLIBS = -lkcgi -lkcgihtml -lsqlite3
+
+-include config.mk
 
 scooper:
+
+clean:
+	rm -f scooper
+
+install: scooper scooper.1
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install scooper ${PREFIX}/bin
+	install -m 644 scooper.1 ${MANDIR}/man1
+
+uninstall:
+	rm -f ${PREFIX}/bin/scooper ${MANDIR}/man1/scooper.1