Browse Source
Merge pull request #778 from peick/master
Build statically linked release executables.
pull/781/head
Chris Lu
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
Makefile
|
@ -8,7 +8,7 @@ appname := weed |
|
|
|
|
|
|
|
|
sources := $(wildcard *.go) |
|
|
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) |
|
|
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) |
|
|
zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3) |
|
|
|
|
|
|
|
|