diff --git a/Makefile b/Makefile index f2590f07..1edef040 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ ################################################################################ PROJECT_NAME := kava# unique namespace for project +GO_BIN ?= go + GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) GIT_COMMIT := $(shell git rev-parse HEAD) GIT_COMMIT_SHORT := $(shell git rev-parse --short HEAD) @@ -186,16 +188,16 @@ all: install build: go.sum ifeq ($(OS), Windows_NT) - go build -mod=readonly $(BUILD_FLAGS) -o out/$(shell go env GOOS)/kava.exe ./cmd/kava + $(GO_BIN) build -mod=readonly $(BUILD_FLAGS) -o out/$(shell $(GO_BIN) env GOOS)/kava.exe ./cmd/kava else - go build -mod=readonly $(BUILD_FLAGS) -o out/$(shell go env GOOS)/kava ./cmd/kava + $(GO_BIN) build -mod=readonly $(BUILD_FLAGS) -o out/$(shell $(GO_BIN) env GOOS)/kava ./cmd/kava endif build-linux: go.sum LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build install: go.sum - go install -mod=readonly $(BUILD_FLAGS) ./cmd/kava + $(GO_BIN) install -mod=readonly $(BUILD_FLAGS) ./cmd/kava ######################################## ### Tools & dependencies