Browse Source

Add make target for linux binary

pull/3006/head
Frank Schroeder 8 years ago
parent
commit
57622c518a
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
  1. 7
      GNUmakefile

7
GNUmakefile

@ -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'"

Loading…
Cancel
Save