From a6dfc26959ab12f155309ae569561ae68c052073 Mon Sep 17 00:00:00 2001 From: Drasko DRASKOVIC Date: Thu, 22 Mar 2018 13:10:11 +0100 Subject: [PATCH] Simplify Makefile (#205) Signed-off-by: Drasko DRASKOVIC --- Makefile | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index afeaa77b..cf60d009 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CGO_ENABLED ?= 0 GOOS ?= linux all: $(SERVICES) -.PHONY: all $(SERVICES) docker +.PHONY: all $(SERVICES) dockers define compile_service CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) go build -ldflags "-s -w" -o ${BUILD_DIR}/mainflux-$(1) cmd/$(1)/main.go @@ -18,16 +18,7 @@ endef proto: protoc --go_out=. *.proto -manager: proto - $(call compile_service,$(@)) - -http: proto - $(call compile_service,$(@)) - -normalizer: proto - $(call compile_service,$(@)) - -coap: proto +$(SERVICES): proto $(call compile_service,$(@)) clean: @@ -36,17 +27,7 @@ clean: install: cp ${BUILD_DIR}/* $(GOBIN) -# Docker -docker_manager: +$(DOCKERS): $(call make_docker,$(@)) -docker_http: - $(call make_docker,$(@)) - -docker_normalizer: - $(call make_docker,$(@)) - -docker_coap: - $(call make_docker,$(@)) - -docker: $(DOCKERS) +dockers: $(DOCKERS)