diff --git a/Makefile b/Makefile index 04f078857..2efad7705 100644 --- a/Makefile +++ b/Makefile @@ -23,12 +23,29 @@ build-windows: "-X main.Version=$(VERSION)" \ ./cmd/telegraf/telegraf.go +build-for-docker: + CGO_ENABLED=0 GOOS=linux go build -o telegraf -ldflags \ + "-X main.Version=$(VERSION)" \ + ./cmd/telegraf/telegraf.go + # Build with race detector dev: prepare go build -race -o telegraf -ldflags \ "-X main.Version=$(VERSION)" \ ./cmd/telegraf/telegraf.go +# Build linux 64-bit, 32-bit and arm architectures +build-linux-bins: prepare + GOARCH=amd64 GOOS=linux go build -o telegraf_linux_amd64 \ + -ldflags "-X main.Version=$(VERSION)" \ + ./cmd/telegraf/telegraf.go + GOARCH=386 GOOS=linux go build -o telegraf_linux_386 \ + -ldflags "-X main.Version=$(VERSION)" \ + ./cmd/telegraf/telegraf.go + GOARCH=arm GOOS=linux go build -o telegraf_linux_arm \ + -ldflags "-X main.Version=$(VERSION)" \ + ./cmd/telegraf/telegraf.go + # Get dependencies and use gdm to checkout changesets prepare: go get github.com/sparrc/gdm