From 04864d200c263ac2a2bebbf5c7038fee19838539 Mon Sep 17 00:00:00 2001 From: Denis Policastro Date: Fri, 6 Oct 2023 04:49:32 -0300 Subject: [PATCH] chore: build static binary for macOS (#128) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1540643..14cd96cd 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,8 @@ cross: $(BUILD_DIR) ## Cross-compile go binaries using CGO. env CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "$(STATIC_LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/linux-arm64-$(BIN_NAME) main.go env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "$(STATIC_LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/linux-amd64-$(BIN_NAME) main.go # MAC builds - this will be functional but will still have secp issues. - env GOOS=darwin GOARCH=arm64 go build -ldflags "$(LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/darwin-arm64-$(BIN_NAME) main.go - env GOOS=darwin GOARCH=amd64 go build -ldflags "$(LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/darwin-amd64-$(BIN_NAME) main.go + env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -ldflags "$(LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/darwin-arm64-$(BIN_NAME) main.go + env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LD_FLAGS)" -tags netgo -o $(BUILD_DIR)/darwin-amd64-$(BIN_NAME) main.go .PHONY: simplecross simplecross: $(BUILD_DIR) ## Cross-compile go binaries without using CGO.