mirror of https://github.com/status-im/consul.git
Add make target for linux binary
This commit is contained in:
parent
367d4760d3
commit
57622c518a
|
@ -28,11 +28,16 @@ bin: tools
|
||||||
|
|
||||||
# dev creates binaries for testing locally - these are put into ./bin and $GOPATH
|
# dev creates binaries for testing locally - these are put into ./bin and $GOPATH
|
||||||
dev:
|
dev:
|
||||||
mkdir -p pkg/$(GOOS)_$(GOARCH) bin/
|
mkdir -p pkg/$(GOOS)_$(GOARCH)/ bin/
|
||||||
go install -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)'
|
go install -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)'
|
||||||
cp $(GOPATH)/bin/consul bin/
|
cp $(GOPATH)/bin/consul bin/
|
||||||
cp $(GOPATH)/bin/consul pkg/$(GOOS)_$(GOARCH)
|
cp $(GOPATH)/bin/consul pkg/$(GOOS)_$(GOARCH)
|
||||||
|
|
||||||
|
# linux builds a linux package indpendent of the source platform
|
||||||
|
linux:
|
||||||
|
mkdir -p pkg/linux_amd64/
|
||||||
|
GOOS=linux GOARCH=amd64 go build -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)' -o pkg/linux_amd64/consul
|
||||||
|
|
||||||
# dist builds binaries for all platforms and packages them for distribution
|
# dist builds binaries for all platforms and packages them for distribution
|
||||||
dist:
|
dist:
|
||||||
@GOTAGS='$(GOTAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
|
@GOTAGS='$(GOTAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"
|
||||||
|
|
Loading…
Reference in New Issue