From cc0046a8e8ab565cd363aac71c3d9a0e5c7e0fd4 Mon Sep 17 00:00:00 2001 From: Sathish kumar Date: Sun, 1 Sep 2019 10:16:21 +0530 Subject: [PATCH] Add support for build across platform on make --- makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index fb3d96b..d063060 100644 --- a/makefile +++ b/makefile @@ -15,13 +15,14 @@ GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) BUILD_CMD=$(GOBUILD) -o $(TARGET_DIR)/$(BINARY_NAME) -v TEST_CMD=$(GOTEST) -v ./... -ZIP_ARCHIVE=current.zip - linuxBuild: clean deps GOOS=linux GOARCH=amd64 $(BUILD_CMD) install: $(GOGET) - +build_all: + for GOARCH in 386 amd64; do \ + $(GOCMD) build -v -o $(TARGET_DIR)/kubedec-linux-$$GOARCH ; \ + done; build: $(BUILD_CMD) test: