Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
Compiling protobuf for go and js
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Feb 17, 2020
1 parent c19434f commit cf82a37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/grpc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.pb.cc
*.pb.h
php
cpp
cpp
go
js
9 changes: 9 additions & 0 deletions tools/grpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ tihu_cpp:
@mkdir -p cpp
$(PROTOC) -I $(PROTOS_PATH) --grpc_out=./cpp --cpp_out=./cpp --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN_PATH) tihu.proto

tihu_js:
@mkdir -p js
$(PROTOC) -I $(PROTOS_PATH) --js_out=./js tihu.proto

tihu_go:
@mkdir -p go
@go get -u github.com/golang/protobuf/protoc-gen-go
$(PROTOC) -I $(PROTOS_PATH) --go_out=./go tihu.proto

tihu_server: tihu.pb.o tihu.grpc.pb.o tihu_server.o
$(CXX) $^ $(LDFLAGS) -o ../../build/$@

Expand Down

0 comments on commit cf82a37

Please sign in to comment.