summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ff38c26
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+# sixkcd - Fetch XKCD comics from the command line
+# See LICENSE file for copyright and license details.
+
+PREFIX=/usr/local
+MANPREFIX=$(PREFIX)/share/man
+
+all:
+ go mod download
+ go build -o sixkcd ./sixkcd.go
+
+install: all
+ mkdir -p $(PREFIX)/bin
+ mkdir -p $(MANPREFIX)/man1
+ cp -f sixkcd $(PREFIX)/bin
+ cp -f sixkcd.1 $(MANPREFIX)/man1
+
+clean:
+ rm -f ./sixkcd
+
+uninstall:
+ rm -f $(PREFIX)/bin/sixkcd
+ rm -f $(MANPREFIX)/man1/sixkcd.1
+
+.PHONY: all install clean uninstall help