Add make target for linux binary

This commit is contained in:
Frank Schroeder 2017-05-04 13:31:56 +02:00
parent 7f745951f4
commit cbb963b2eb
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 6 additions and 1 deletions

View File

@ -28,11 +28,16 @@ bin: tools
# dev creates binaries for testing locally - these are put into ./bin and $GOPATH
dev:
mkdir -p pkg/$(GOOS)_$(GOARCH) bin/
mkdir -p pkg/$(GOOS)_$(GOARCH)/ bin/
go install -ldflags '$(GOLDFLAGS)' -tags '$(GOTAGS)'
cp $(GOPATH)/bin/consul bin/
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:
@GOTAGS='$(GOTAGS)' sh -c "'$(CURDIR)/scripts/dist.sh'"