diff options
author | Alex David <flu0r1ne@flu0r1ne.net> | 2021-08-06 01:19:26 -0500 |
---|---|---|
committer | Alex David <flu0r1ne@flu0r1ne.net> | 2021-08-06 01:19:26 -0500 |
commit | f21a68215d43a26311aff8d729bc084bc8165e7b (patch) | |
tree | d9a82a4cf30f01e332c99b3c293df07bee22ee6d /Makefile | |
parent | 043be96efbcb093e6538bb214974db143567175d (diff) | |
download | deb-planr-f21a68215d43a26311aff8d729bc084bc8165e7b.tar.xz deb-planr-f21a68215d43a26311aff8d729bc084bc8165e7b.zip |
edge/latest release
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -1,4 +1,24 @@ -planr: - go build -o planr ./cmd/main.go +ifeq ($(PREFIX),) + PREFIX := /usr/local +endif -.PHONY: planr +ifeq ($(BINDIR),) + BINDIR := /bin +endif + +CMD := planr + +$(CMD): + go build -o $(CMD) ./cmd/main.go + +install: + mkdir -p $(DESTDIR)$(PREFIX)$(BINDIR)/ + install -D -m 755 $(CMD) $(DESTDIR)$(PREFIX)$(BINDIR)/ + +uninstall: + rm -rf $(DESTDIR)$(PREFIX)$(BINDIR)/$(CMD) + +clean: + rm -rf $(CMD) + +.PHONY: clean install uninstall $(CMD) |