forked from lf-edge/eve-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (18 loc) · 885 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
proto-container:
docker build -f .devcontainer/Dockerfile -t eve-api-builder .
docker run --rm --env HOME=/src -v $(PWD):/src -w /src -u $$(id -u) eve-api-builder make proto
proto-diagram:
protodot -inc /usr/local/include -src ./proto/config/devconfig.proto -output devconfig -generated ./images
dot ./images/devconfig.dot -Tpng -o ./images/devconfig.png
dot ./images/devconfig.dot -Tsvg -o ./images/devconfig.svg
echo generated ./images/devconfig.*
.PHONY: proto-api-% proto proto-container
proto: go python proto-diagram
@echo Done building protobuf, you may want to vendor it into your packages, e.g. pkg/pillar.
@echo See ./go/README.md for more information.
go: PROTOC_OUT_OPTS=paths=source_relative:
go: proto-api-go
python: proto-api-python
proto-api-%:
rm -rf $*/*/; mkdir -p $* # building $@
protoc -I./proto --$(*)_out=$(PROTOC_OUT_OPTS)./$* proto/*/*.proto