diff --git a/Makefile b/Makefile index c7ea4b275..794010ab3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PWD := $(shell pwd) GOPATH := $(shell go env GOPATH) -LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) +LDFLAGS ?= $(shell go run buildscripts/gen-ldflags.go) GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) @@ -178,7 +178,7 @@ build-debugging: build: checks build-debugging ## builds minio to $(PWD) @echo "Building minio binary to './minio'" - @CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null + @CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null hotfix-vars: $(eval LDFLAGS := $(shell MINIO_RELEASE="RELEASE" MINIO_HOTFIX="hotfix.$(shell git rev-parse --short HEAD)" go run buildscripts/gen-ldflags.go $(shell git describe --tags --abbrev=0 | \