aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:35:27 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-03 14:35:27 +0200
commit1507d12b6398448c53bdffe18a32018a3ef627e7 (patch)
tree569ac3b7457b2a65590f1c6809df15e36e0ad641 /Makefile
parent41f860a791c9869ce68d55aeb97cc07d7f47c09c (diff)
downloadapkdoc-1507d12b6398448c53bdffe18a32018a3ef627e7.tar.gz
apkdoc-1507d12b6398448c53bdffe18a32018a3ef627e7.tar.bz2
apkdoc-1507d12b6398448c53bdffe18a32018a3ef627e7.zip
feat: Add install rule
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0c1a1f6..820d664 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/bin
BIN?=apkdoc
+OUT=./bin/$(BIN)
GO_RUN?= go run -v
GO_BUILD?= go build -v
@@ -9,9 +12,12 @@ run: tmpl
build: tmpl
$(GO_BUILD) \
- -o bin/$(BIN) \
+ -o $(OUT) \
.
+install: build
+ install -Dm755 $(OUT) $(BINDIR)/$(BIN)
+
tmpl:
cd ./templates && \
qtc *