diff --git a/Makefile b/Makefile index 800fc7a3d..acb258370 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,6 @@ EXT= ifeq ($(OS),Windows_NT) POWERSHELL=powershell -NoProfile -Command - GO=go - WEB_GO=go WINDOWS_GOARCH_RAW:=$(strip $(shell go env GOARCH 2>NUL)) endif @@ -34,13 +32,15 @@ CONFIG_PKG=github.com/sipeed/picoclaw/pkg/config LDFLAGS=-X $(CONFIG_PKG).Version=$(VERSION) -X $(CONFIG_PKG).GitCommit=$(GIT_COMMIT) -X $(CONFIG_PKG).BuildTime=$(BUILD_TIME) -X $(CONFIG_PKG).GoVersion=$(GO_VERSION) -s -w # Go variables -GO?=CGO_ENABLED=0 go +GO?=go WEB_GO?=$(GO) +CGO_ENABLED?=0 GO_BUILD_TAGS?=goolm,stdjson GOFLAGS?=-v -tags $(GO_BUILD_TAGS) GOCACHE?=$(CURDIR)/.cache/go-build GOMODCACHE?=$(CURDIR)/.cache/go-mod GOTOOLCHAIN?=local +export CGO_ENABLED export GOCACHE export GOMODCACHE export GOTOOLCHAIN diff --git a/web/Makefile b/web/Makefile index 2627214e2..0c9344a89 100644 --- a/web/Makefile +++ b/web/Makefile @@ -2,13 +2,15 @@ build-android-arm64 build-android-bundle # Go variables -GO?=CGO_ENABLED=0 go +GO?=go WEB_GO?=$(GO) +CGO_ENABLED?=0 GO_BUILD_TAGS?=goolm,stdjson GOFLAGS?=-v -tags $(GO_BUILD_TAGS) GOCACHE?=$(abspath ../.cache/go-build) GOMODCACHE?=$(abspath ../.cache/go-mod) GOTOOLCHAIN?=local +export CGO_ENABLED export GOCACHE export GOMODCACHE export GOTOOLCHAIN @@ -28,8 +30,6 @@ LAUNCHER_GUI_LDFLAG= ifeq ($(OS),Windows_NT) POWERSHELL=powershell -NoProfile -Command - GO=go - WEB_GO=go WINDOWS_GOARCH_RAW:=$(strip $(shell go env GOARCH 2>NUL)) endif