From 17f95ab1f56d5ce1b1a47823c26fcdb2a24edac3 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Thu, 3 Oct 2019 11:05:31 -0400 Subject: [PATCH] Simplify helloworld makefile Use pkg-config to automatically find grpc as a dependency of grpc++. --- examples/cpp/helloworld/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index 9af7337fd1b..8030ba2be29 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -20,12 +20,12 @@ CXX = g++ CPPFLAGS += `pkg-config --cflags protobuf grpc` CXXFLAGS += -std=c++11 ifeq ($(SYSTEM),Darwin) -LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\ +LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++`\ -pthread\ -lgrpc++_reflection\ -ldl else -LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\ +LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++`\ -pthread\ -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed\ -ldl