diff --git a/Makefile b/Makefile index 4daf5fa..01276c1 100644 --- a/Makefile +++ b/Makefile @@ -19,31 +19,31 @@ clean: ## Remove build products (./out) .PHONY: build build: ## Build for the current platform & architecture to ./out mkdir -p out - go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME} . + env CGO_ENABLED=0 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME} . .PHONY: build-linux-amd64 build-linux-amd64: ## Build for Linux/amd64 to ./out - env GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-amd64 . + env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-amd64 . .PHONY: build-linux-arm64 build-linux-arm64: ## Build for Linux/arm64 to ./out - env GOOS=linux GOARCH=arm64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-arm64 . + env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-arm64 . .PHONY: build-linux-armv7 build-linux-armv7: ## Build for Linux/armv7 to ./out - env GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-armv7 . + env CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-armv7 . .PHONY: build-linux-armv6 build-linux-armv6: ## Build for Linux/armv6 to ./out - env GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-armv6 . + env CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-linux-armv6 . .PHONY: build-darwin-amd64 build-darwin-amd64: ## Build for macOS/amd64 to ./out - env GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-darwin-amd64 . + env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-darwin-amd64 . .PHONY: build-darwin-arm64 build-darwin-arm64: ## Build for macOS/arm64 to ./out - env GOOS=darwin GOARCH=arm64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-darwin-arm64 . + env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-X main.version=${BIN_VERSION}" -o ./out/${BIN_NAME}-${BIN_VERSION}-darwin-arm64 . .PHONY: package package: all ## Build all binaries + .deb packages to ./out (requires fpm: https://fpm.readthedocs.io)