Add Makefile

This commit is contained in:
Manfred Touron
2016-12-13 10:36:55 +01:00
parent 218f25ab56
commit ce8f7bd8a7
7 changed files with 517 additions and 5 deletions

14
examples/go-kit/Makefile Normal file
View File

@@ -0,0 +1,14 @@
SOURCES := $(shell find . -name "*.proto" -not -path ./vendor/\*)
TARGETS_GO := $(foreach source, $(SOURCES), $(source)_go)
TARGETS_TMPL := $(foreach source, $(SOURCES), $(source)_tmpl)
.PHONY: build
build: $(TARGETS_GO) $(TARGETS_TMPL)
$(TARGETS_GO): %_go:
protoc --gogo_out="$(dir $*)" "$*"
$(TARGETS_TMPL): %_tmpl:
@mkdir -p $(dir $*)gen
protoc -I. --gotemplate_out=template_dir=templates:output "$*"