From 7d1b7a2225f140017ec20d659d1adedde484e7c1 Mon Sep 17 00:00:00 2001 From: Evan Hosinski Date: Tue, 20 May 2025 10:41:09 -0400 Subject: [PATCH] Updated the makefile to reflect CGO_ENABLED=0 --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 31187b9..eee48d8 100644 --- a/Makefile +++ b/Makefile @@ -30,18 +30,14 @@ clean: # Build for current platform build: - CGO_ENABLED=1 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME) -ldflags "-X main.version=$(VERSION)" crowsnest.go + CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME) -ldflags "-X main.version=$(VERSION)" crowsnest.go # Build for all platforms build-all: clean @for platform in $(PLATFORMS); do \ for arch in $(ARCHS); do \ echo "Building for $$platform/$$arch..."; \ - if [ "$$platform" = "windows" ] || [ "$$platform" = "darwin" ]; then \ - GOOS=$$platform GOARCH=$$arch CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch -ldflags "-X main.version=$(VERSION)" crowsnest.go; \ - else \ - GOOS=$$platform GOARCH=$$arch CGO_ENABLED=1 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch -ldflags "-X main.version=$(VERSION)" crowsnest.go; \ - fi; \ + GOOS=$$platform GOARCH=$$arch CGO_ENABLED=0 $(GO) build -o $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch -ldflags "-X main.version=$(VERSION)" crowsnest.go; \ if [ "$$platform" = "windows" ]; then \ mv $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch $(BUILD_DIR)/$(BINARY_NAME)-$$platform-$$arch.exe; \ fi; \