diff --git a/Makefile b/Makefile index 2643242b9..b5209ee44 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: lint test static cross +.PHONY: lint test static install uninstall cross VERSION := $(shell git describe --tags --dirty --always) BIN_DIR := $(GOPATH)/bin GOX := $(BIN_DIR)/gox @@ -18,6 +18,12 @@ LDFLAGS := '-s -w -extldflags "-static" -X main.Version=${VERSION}' static: CGO_ENABLED=0 GOOS=linux go build -ldflags=${LDFLAGS} ./cmd/tk +install: + CGO_ENABLED=0 go install -ldflags=${LDFLAGS} ./cmd/tk + +uninstall: + go clean -i ./cmd/tk + $(GOX): go get -u github.com/mitchellh/gox cross: $(GOX)