From 57e159b36998e3cf9521132f1606dd00fd54cc93 Mon Sep 17 00:00:00 2001 From: Michael Peick Date: Thu, 29 Nov 2018 13:26:48 +0100 Subject: [PATCH] Build statically linked release executables. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aabd7b448..9357b2a03 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ appname := weed sources := $(wildcard *.go) -build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3) $(SOURCE_DIR) +build = CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -ldflags "-extldflags -static" -o build/$(appname)$(3) $(SOURCE_DIR) tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3) zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3)