diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..652ad92 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +BINARY := qpass +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +GO ?= go + +.PHONY: all build clean fmt install test uninstall + +all: build + +build: + mkdir -p bin + CGO_ENABLED=0 $(GO) build -buildvcs=false -trimpath -ldflags="-s -w" -o bin/$(BINARY) ./cmd/qpass + +fmt: + $(GO) fmt ./... + +test: + $(GO) test ./... + +install: build + install -Dm755 bin/$(BINARY) "$(DESTDIR)$(BINDIR)/$(BINARY)" + +uninstall: + rm -f "$(DESTDIR)$(BINDIR)/$(BINARY)" + +clean: + rm -rf bin |
