Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
Drasko DRASKOVIC 2018-03-20 00:09:44 +01:00 committed by GitHub
parent f5fbd6f22a
commit 2c1c94af9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

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