-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 1023 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
25
26
27
28
29
30
31
32
PHP_BUILD_PLUGIN=`which grpc_php_plugin`
GO_BUILD_PLUGIN=`which protoc-gen-go-grpc`
JAVA_BUILD_PLUGIN=`which protoc-gen-grpc-java`
PHP_PROTO_OUT="src/main/php"
GO_PROTO_BASEDIR="./"
GO_PROTO_OUT="xyron"
JAVA_PROTO_OUT="java_protobuf/src/main/java"
php:
@mkdir -p $(PHP_PROTO_OUT)
@rm -rdf $(PHP_PROTO_OUT)
@mkdir -p $(PHP_PROTO_OUT)
@cd src/main/proto && protoc --plugin=protoc-gen-grpc=$(PHP_BUILD_PLUGIN) ./*.proto --php_out="../../../$(PHP_PROTO_OUT)" --grpc_out="../../../$(PHP_PROTO_OUT)"
go:
@rm -rdf $(GO_PROTO_OUT)
@mkdir -p $(GO_PROTO_OUT)
@cd src/main/proto && protoc --plugin=protoc-gen-grpc=$(GO_BUILD_PLUGIN) ./*.proto --go_out="../../../$(GO_PROTO_BASEDIR)" --grpc_out="../../../$(GO_PROTO_BASEDIR)"
java:
@mkdir -p $(JAVA_PROTO_OUT)
@rm -rdf $(JAVA_PROTO_OUT)
@mkdir -p $(JAVA_PROTO_OUT)
@cd src/main/proto && protoc --plugin=protoc-gen-grpc=$(JAVA_BUILD_PLUGIN) ./*.proto --java_out="../../../$(JAVA_PROTO_OUT)" --grpc_out="../../../$(JAVA_PROTO_OUT)"
all:
@make php
@make go
@make java