From 6ef5fd222532202a6e3a4f68e514aa6086c0ccd8 Mon Sep 17 00:00:00 2001 From: jolts Date: Fri, 24 Jan 2025 13:28:02 +0200 Subject: [PATCH] Refactor Makefile to set CGO_ENABLED=0 for Windows builds and improve build commands --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 54509ef..9937b76 100644 --- a/Makefile +++ b/Makefile @@ -39,16 +39,16 @@ build_mips64: GOARCH=mips64 $(MAKE) build_single build_windows: - $(MAKE) build_single_windows GOOS=windows GOARCH=amd64 + GOOS=windows GOARCH=amd64 $(MAKE) build_single_windows build_windows_386: - $(MAKE) build_single_windows GOOS=windows GOARCH=386 + GOOS=windows GOARCH=386 $(MAKE) build_single_windows build_single_windows: - go build -o $(BIN_DIR)/$(BIN_NAME)-$(GOOS)-$(GOARCH).exe + CGO_ENABLED=0 go build -o $(BIN_DIR)/$(BIN_NAME)-$(GOOS)-$(GOARCH).exe build_single: - go build -o $(BIN_DIR)/$(BIN_NAME)-$(GOOS)-$(GOARCH) + CGO_ENABLED=0 go build -o $(BIN_DIR)/$(BIN_NAME)-$(GOOS)-$(GOARCH) debug: go build -tags debug -gcflags "all=-N -l" -o $(BIN_DIR)/$(BIN_NAME)-$(GOOS)-$(GOARCH)-debug