---
This adds a simple Makefile to ease compilation and installation.
Makefile | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Makefile
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8cc57e5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+.POSIX:
+.SUFFIXES:
+
+GO = go
+RM = rm
+SCDOC = scdoc
+GOFLAGS =
+PREFIX = /usr/local
+BINDIR = bin
+MANDIR = share/man
+
+all: senpai doc/senpai.1 doc/senpai.5
+
+senpai:
+ $(GO) build $(GOFLAGS) ./cmd/senpai
+doc/senpai.1: doc/senpai.1.scd
+ $(SCDOC) < doc/senpai.1.scd > doc/senpai.1
+doc/senpai.5: doc/senpai.5.scd
+ $(SCDOC) < doc/senpai.5.scd > doc/senpai.5
+
+clean:
+ $(RM) -rf senpai doc/senpai.1 doc/senpai.5
+install: all
+ mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
+ mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+ mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
+ cp -f senpai $(DESTDIR)$(PREFIX)/$(BINDIR)
+ cp -f doc/senpai.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+ cp -f doc/senpai.5 $(DESTDIR)$(PREFIX)/$(MANDIR)/man5
+uninstall:
+ $(RM) $(DESTDIR)$(PREFIX)/$(BINDIR)/senpai
+ $(RM) $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/senpai.1
+ $(RM) $(DESTDIR)$(PREFIX)/$(MANDIR)/man5/senpai.5
--
2.30.2