aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/Makefile.template
diff options
context:
space:
mode:
authorGravatar Mahak Mukhi <mmukhi@google.com>2017-04-18 14:40:00 -0700
committerGravatar Mahak Mukhi <mmukhi@google.com>2017-04-18 14:40:00 -0700
commitfb059a2782c33bbbefc65b4c6ee4ef6087cbcf3a (patch)
treef07343b7aea7b585902f31660ace7d7571ccf1e0 /templates/Makefile.template
parent980e9805c38c16856964cbfc9b06f31c6fd948af (diff)
discovered generate_projects.sh script!
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r--templates/Makefile.template15
1 files changed, 11 insertions, 4 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 8f61a8b990..84afcdb354 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -311,7 +311,7 @@
USE_BUILT_PROTOC = false
endif
- GTEST_LIB = -Ithird_party/googletest/googletest/include -Ithird_party/googletest/googletest third_party/googletest/googletest/src/gtest-all.cc
+ GTEST_LIB = -Ithird_party/googletest/googletest/include -Ithird_party/googletest/googletest third_party/googletest/googletest/src/gtest-all.cc -Ithird_party/googletest/googlemock/include -Ithird_party/googletest/googlemock third_party/googletest/googlemock/src/gmock-all.cc
GTEST_LIB += -lgflags
ifeq ($(V),1)
E = @:
@@ -716,7 +716,7 @@
PC_REQUIRES_GRPCXX =
PC_LIBS_GRPCXX =
- CPPFLAGS := -Ithird_party/googletest/googletest/include $(CPPFLAGS)
+ CPPFLAGS := -Ithird_party/googletest/googletest/include -Ithird_party/googletest/googlemock/include $(CPPFLAGS)
PROTOC_PLUGINS_ALL =\
% for tgt in targets:
@@ -846,7 +846,6 @@
@echo
@echo "The target you are trying to run requires an OpenSSL implementation."
@echo "Your system doesn't have one, and either the third_party directory"
- @echo "doesn't have it, or your compiler can't build BoringSSL."
@echo
@echo "Please consult INSTALL to get more information."
@echo
@@ -1240,6 +1239,14 @@
$(GENDIR)/${p}.pb.cc: protoc_dep_error
$(GENDIR)/${p}.grpc.pb.cc: protoc_dep_error
else
+ <%
+ pluginflags=""
+ %>
+ % if p in ["src/proto/grpc/testing/compiler_test", "src/proto/grpc/testing/echo"]:
+ <%
+ pluginflags="generate_mock_code=true:"
+ %>
+ % endif
$(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc' % q for q in proto_deps.get(p, []))}
$(E) "[PROTOC] Generating protobuf CC file from $<"
$(Q) mkdir -p `dirname $@`
@@ -1248,7 +1255,7 @@
$(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))}
$(E) "[GRPC] Generating gRPC's protobuf service CC file from $<"
$(Q) mkdir -p `dirname $@`
- $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $<
+ $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=${pluginflags}$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $<
endif
% endfor