From 5ecd6fe78b635d0eaa853c21139361f1af0f9a12 Mon Sep 17 00:00:00 2001 From: hubbylei Date: Sun, 15 Dec 2024 21:45:50 +0800 Subject: [PATCH] fix get go env --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7653e306..bbc00e88 100644 --- a/Makefile +++ b/Makefile @@ -17,13 +17,13 @@ LDFLAGS = -X github.com/xtls/xray-core/core.build=$(VERSION) -s -w -buildid= PARAMS = -trimpath -ldflags "$(LDFLAGS)" -v MAIN = ./main PREFIX ?= $(shell go env GOPATH) -ifeq ($(GOOS),windows) +ifeq ($(shell go env GOOS),windows) OUTPUT = $(NAME).exe ADDITION = go build -o w$(NAME).exe -trimpath -ldflags "-H windowsgui $(LDFLAGS)" -v $(MAIN) else OUTPUT = $(NAME) endif -ifeq ($(shell echo "$(GOARCH)" | grep -Eq "(mips|mipsle)" && echo true),true) # +ifeq ($(shell echo "$(shell go env GOARCH)" | grep -Eq "(mips|mipsle)" && echo true),true) # ADDITION = GOMIPS=softfloat go build -o $(NAME)_softfloat -trimpath -ldflags "$(LDFLAGS)" -v $(MAIN) endif .PHONY: clean build