From 476cccf2dd4a4cc903f9d08b4f24fc740c2a25ae Mon Sep 17 00:00:00 2001 From: Eugene Medvedev Date: Tue, 28 May 2019 09:42:09 +0500 Subject: [PATCH] fix makefile --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 13d20c1..5b2d2b7 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +PLATFORMS=darwin linux windows + default: deps build deps: @echo "==> Updating build dependencies..." @@ -5,7 +7,8 @@ deps: build: @echo "==> Building for all platforms..." - GOOS=linux GOARCH=amd64 go build -o build/sicra - tar -czf build/sicra-linux-amd64.tar.gz build/sicra + $(foreach GOOS, $(PLATFORMS),\ + $(shell GOOS=$(GOOS) GOARCH=amd64 go build -o build/$(GOOS)/sicra && \ + tar -czf build/sicra-$(GOOS)-amd64.tar.gz build/$(GOOS)/sicra)) .PHONY: deps build