summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-06-06 01:25:11 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-06-06 01:25:11 -0400
commit106597566c8d9b901aa5cad75767340386e00cd8 (patch)
treeeaa607da823bc4c5c4a4ff0610c7b17ca3811c06 /Makefile
parentf2aa28deb420987e6183086d66b2c2c43a98a256 (diff)
Build with makefile + raw 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