aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2018-11-29 09:14:18 -0800
committerGitHub <noreply@github.com>2018-11-29 09:14:18 -0800
commit44d7a49a484a667766ced54ee10da032077038c8 (patch)
tree74eab7eb67c866991c426915b42eea0cb8cea1c6
parentc6a567acab6f06e254041939e1be8e46b400cec4 (diff)
parent57e159b36998e3cf9521132f1606dd00fd54cc93 (diff)
downloadseaweedfs-44d7a49a484a667766ced54ee10da032077038c8.tar.xz
seaweedfs-44d7a49a484a667766ced54ee10da032077038c8.zip
Merge pull request #778 from peick/master
Build statically linked release executables.
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
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)