--- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ NAME=lite BINDIR=bin -VERSION=$(shell git describe --tags || echo "unknown version") BUILDTIME=$(shell date -u) -GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/xxf098/LiteSpeedTest/constant.Version=$(VERSION)" \ +GOBUILD=CGO_ENABLED=1 go build -trimpath -ldflags '-X "github.com/xxf098/LiteSpeedTest/constant.Version=$(VERSION)" \ -X "github.com/xxf098/LiteSpeedTest/constant.BuildTime=$(BUILDTIME)" \ -w -s -buildid=' @@ -27,10 +26,8 @@ windows-arm64 \ windows-arm32v7 -all: linux-amd64 darwin-amd64 windows-amd64 # Most used - -dockerbin: - $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ +all: + $(GOBUILD) -o $(BINDIR)/$(NAME) darwin-amd64: GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ @@ -128,4 +125,5 @@ GOOS=freebsd golangci-lint run ./... clean: - rm $(BINDIR)/* \ No newline at end of file + rm $(BINDIR)/* +