summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhuker667 <huker@tuta.io>2026-03-25 15:18:06 +0300
committerhuker667 <huker@tuta.io>2026-03-25 15:18:06 +0300
commitb666285bd886fec492cf6cd911dfd5dd69f0eb60 (patch)
treefab772d3d4ababe27565fd03dc32273283013bf5
parentc021e8e6c2f54d8315df111243e501bf1ba648b1 (diff)
downloadqulay-b666285bd886fec492cf6cd911dfd5dd69f0eb60.tar.gz
qulay-b666285bd886fec492cf6cd911dfd5dd69f0eb60.tar.bz2
qulay-b666285bd886fec492cf6cd911dfd5dd69f0eb60.zip
add DESTDIR support in make
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a7970e1..50e5b08 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
+PREFIX ?= /usr
+DESTDIR ?=
BINARY=qulay
SRC=main.go
-PREFIX=/usr
.PHONY: all clean install uninstall deps
@@ -11,12 +12,12 @@ deps:
go mod tidy
install: all
- install -Dm755 $(BINARY) $(PREFIX)/bin/$(BINARY)
- @echo "qulay installed to $(PREFIX)/bin"
+ install -Dm755 $(BINARY) $(DESTDIR)$(PREFIX)/bin/$(BINARY)
+ @echo "qulay installed to $(DESTDIR)$(PREFIX)/bin"
uninstall:
- rm -f $(PREFIX)/bin/$(BINARY)
- @echo "qulay removed from $(PREFIX)/bin"
+ rm -f $(DESTDIR)$(PREFIX)/bin/$(BINARY)
+ @echo "qulay removed from $(DESTDIR)$(PREFIX)/bin"
clean:
rm -f $(BINARY)