Simplify helloworld makefile

Use pkg-config to automatically find grpc as a dependency of grpc++.
pull/20211/head
Zack Galbreath 5 years ago
parent d249dc9cf3
commit 17f95ab1f5
  1. 4
      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

Loading…
Cancel
Save