Updating examples to reflect the new state of things.
diff --git a/cpp/helloworld/Makefile b/cpp/helloworld/Makefile
index bfa9c08..3812689 100644
--- a/cpp/helloworld/Makefile
+++ b/cpp/helloworld/Makefile
@@ -43,14 +43,17 @@
all: system-check greeter_client greeter_server
-greeter_client: helloworld.pb.o greeter_client.o
+greeter_client: helloworld.grpc.pb.o helloworld.pb.o greeter_client.o
$(CXX) $^ $(LDFLAGS) -o $@
greeter_server: helloworld.pb.o greeter_server.o
$(CXX) $^ $(LDFLAGS) -o $@
+%.grpc.pb.cc: %.proto
+ $(PROTOC) -I $(PROTOS_PATH) --grpc_out=. --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN_PATH) $<
+
%.pb.cc: %.proto
- $(PROTOC) -I $(PROTOS_PATH) --cpp_out=. --grpc_out=. --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN_PATH) $<
+ $(PROTOC) -I $(PROTOS_PATH) --cpp_out=. $<
clean:
rm -f *.o *.pb.cc *.pb.h greeter_client greeter_server
diff --git a/cpp/helloworld/greeter_client.cc b/cpp/helloworld/greeter_client.cc
index 0cec4a3..4776cf9 100644
--- a/cpp/helloworld/greeter_client.cc
+++ b/cpp/helloworld/greeter_client.cc
@@ -42,7 +42,7 @@
#include <grpc++/create_channel.h>
#include <grpc++/credentials.h>
#include <grpc++/status.h>
-#include "helloworld.pb.h"
+#include "helloworld.grpc.pb.h"
using grpc::ChannelArguments;
using grpc::ChannelInterface;
diff --git a/cpp/helloworld/greeter_server.cc b/cpp/helloworld/greeter_server.cc
index e7f355f..a090075 100644
--- a/cpp/helloworld/greeter_server.cc
+++ b/cpp/helloworld/greeter_server.cc
@@ -41,7 +41,7 @@
#include <grpc++/server_context.h>
#include <grpc++/server_credentials.h>
#include <grpc++/status.h>
-#include "helloworld.pb.h"
+#include "helloworld.grpc.pb.h"
using grpc::Server;
using grpc::ServerBuilder;