From 2c1c94af9b24d7bea6ad3a22e842ffb28fdfea85 Mon Sep 17 00:00:00 2001 From: Drasko DRASKOVIC Date: Tue, 20 Mar 2018 00:09:44 +0100 Subject: [PATCH] Fix #195 (#196) Signed-off-by: Drasko DRASKOVIC --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index da71ac85..afeaa77b 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ -BUILD_DIR=build -SERVICES=manager http normalizer coap -DOCKERS=$(addprefix docker_,$(SERVICES)) +BUILD_DIR = build +SERVICES = manager http normalizer coap +DOCKERS = $(addprefix docker_,$(SERVICES)) +CGO_ENABLED ?= 0 +GOOS ?= linux all: $(SERVICES) .PHONY: all $(SERVICES) docker define compile_service - GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build -ldflags "-s -w" -o ${BUILD_DIR}/mainflux-$(1) cmd/$(1)/main.go + CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build -ldflags "-s -w" -o ${BUILD_DIR}/mainflux-$(1) cmd/$(1)/main.go endef define make_docker