From b666285bd886fec492cf6cd911dfd5dd69f0eb60 Mon Sep 17 00:00:00 2001 From: huker667 Date: Wed, 25 Mar 2026 15:18:06 +0300 Subject: add DESTDIR support in make --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Makefile') 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) -- cgit v1.3.1