|
|
|
@ -333,6 +333,19 @@ HOST_LDLIBS = $(LDLIBS) |
|
|
|
|
|
|
|
|
|
HAS_PKG_CONFIG = $(shell command -v pkg-config >/dev/null 2>&1 && echo true || echo false)
|
|
|
|
|
|
|
|
|
|
PC_TEMPLATE = prefix=$(prefix)\nexec_prefix=\$${prefix}\nincludedir=\$${prefix}/include\nlibdir=\$${exec_prefix}/lib\n\nName: $(PC_NAME)\nDescription: $(PC_DESCRIPTION)\nVersion: $(VERSION)\nCflags: -I\$${includedir} $(PC_CFLAGS)\nRequires.private: $(PC_REQUIRES_PRIVATE)\nLibs: -L\$${libdir}\nLibs.private: $(PC_LIBS_PRIVATE)
|
|
|
|
|
|
|
|
|
|
# gpr .pc file
|
|
|
|
|
PC_NAME = Google Public Runtime
|
|
|
|
|
PC_DESCRIPTION = Google Public Runtime
|
|
|
|
|
PC_CFLAGS = -pthread
|
|
|
|
|
PC_REQUIRES_PRIVATE =
|
|
|
|
|
PC_LIBS_PRIVATE = -lpthread
|
|
|
|
|
ifeq ($(SYSTEM),Darwin) |
|
|
|
|
PC_LIBS_PRIVATE += -lrt
|
|
|
|
|
endif |
|
|
|
|
GPR_PC_FILE := $(PC_TEMPLATE)
|
|
|
|
|
|
|
|
|
|
ifeq ($(SYSTEM),MINGW32) |
|
|
|
|
SHARED_EXT = dll
|
|
|
|
|
endif |
|
|
|
@ -446,6 +459,9 @@ else |
|
|
|
|
HAS_EMBEDDED_PROTOBUF = true
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
PC_REQUIRES_GRPC = gpr
|
|
|
|
|
PC_LIBS_GRPC =
|
|
|
|
|
|
|
|
|
|
ifeq ($(HAS_SYSTEM_ZLIB),false) |
|
|
|
|
ifeq ($(HAS_EMBEDDED_ZLIB),true) |
|
|
|
|
ZLIB_DEP = $(LIBDIR)/$(CONFIG)/zlib/libz.a
|
|
|
|
@ -458,14 +474,21 @@ else |
|
|
|
|
ifeq ($(HAS_PKG_CONFIG),true) |
|
|
|
|
CPPFLAGS += $(shell pkg-config --cflags zlib)
|
|
|
|
|
LDFLAGS += $(shell pkg-config --libs-only-L zlib)
|
|
|
|
|
PC_REQUIRES_GRPC += zlib
|
|
|
|
|
else |
|
|
|
|
PC_LIBS_GRPC += -lz
|
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
OPENSSL_PKG_CONFIG = false
|
|
|
|
|
|
|
|
|
|
PC_REQUIRES_SECURE =
|
|
|
|
|
PC_LIBS_SECURE =
|
|
|
|
|
|
|
|
|
|
ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),true) |
|
|
|
|
ifeq ($(HAS_PKG_CONFIG),true) |
|
|
|
|
OPENSSL_PKG_CONFIG = true
|
|
|
|
|
PC_REQUIRES_SECURE = openssl
|
|
|
|
|
CPPFLAGS := $(shell pkg-config --cflags openssl) $(CPPFLAGS)
|
|
|
|
|
LDFLAGS_OPENSSL_PKG_CONFIG = $(shell pkg-config --libs-only-L openssl)
|
|
|
|
|
ifeq ($(SYSTEM),Linux) |
|
|
|
@ -478,6 +501,7 @@ else |
|
|
|
|
LIBS_SECURE = $(OPENSSL_LIBS)
|
|
|
|
|
ifeq ($(OPENSSL_REQUIRES_DL),true) |
|
|
|
|
LIBS_SECURE += dl
|
|
|
|
|
PC_LIBS_SECURE = $(addprefix -l, $(LIBS_SECURE))
|
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
else |
|
|
|
@ -501,11 +525,31 @@ else |
|
|
|
|
LDLIBS_SECURE += $(addprefix -l, $(LIBS_SECURE))
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
# grpc .pc file
|
|
|
|
|
PC_NAME = gRPC
|
|
|
|
|
PC_DESCRIPTION = high performance general RPC framework
|
|
|
|
|
PC_CFLAGS =
|
|
|
|
|
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC) $(PC_REQUIRES_SECURE)
|
|
|
|
|
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC) $(PC_LIBS_SECURE)
|
|
|
|
|
GRPC_PC_FILE := $(PC_TEMPLATE)
|
|
|
|
|
|
|
|
|
|
# gprc_unsecure .pc file
|
|
|
|
|
PC_NAME = gRPC unsecure
|
|
|
|
|
PC_DESCRIPTION = high performance general RPC framework without SSL
|
|
|
|
|
PC_CFLAGS =
|
|
|
|
|
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC)
|
|
|
|
|
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC)
|
|
|
|
|
GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE)
|
|
|
|
|
|
|
|
|
|
PROTOBUF_PKG_CONFIG = false
|
|
|
|
|
|
|
|
|
|
PC_REQUIRES_GRPCXX =
|
|
|
|
|
PC_LIBS_GRPCXX =
|
|
|
|
|
|
|
|
|
|
ifeq ($(HAS_SYSTEM_PROTOBUF),true) |
|
|
|
|
ifeq ($(HAS_PKG_CONFIG),true) |
|
|
|
|
PROTOBUF_PKG_CONFIG = true
|
|
|
|
|
PC_REQUIRES_GRPCXX = protobuf
|
|
|
|
|
CPPFLAGS := $(shell pkg-config --cflags protobuf) $(CPPFLAGS)
|
|
|
|
|
LDFLAGS_PROTOBUF_PKG_CONFIG = $(shell pkg-config --libs-only-L protobuf)
|
|
|
|
|
ifeq ($(SYSTEM),Linux) |
|
|
|
@ -513,6 +557,8 @@ ifneq ($(LDFLAGS_PROTOBUF_PKG_CONFIG),) |
|
|
|
|
LDFLAGS_PROTOBUF_PKG_CONFIG += $(shell pkg-config --libs-only-L protobuf | sed s/L/Wl,-rpath,/)
|
|
|
|
|
endif |
|
|
|
|
endif |
|
|
|
|
else |
|
|
|
|
PC_LIBS_GRPCXX = -lprotobuf
|
|
|
|
|
endif |
|
|
|
|
else |
|
|
|
|
ifeq ($(HAS_EMBEDDED_PROTOBUF),true) |
|
|
|
@ -536,6 +582,22 @@ else |
|
|
|
|
LDLIBS_PROTOBUF += $(addprefix -l, $(LIBS_PROTOBUF))
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
# grpc++ .pc file
|
|
|
|
|
PC_NAME = gRPC++
|
|
|
|
|
PC_DESCRIPTION = C++ wrapper for gRPC
|
|
|
|
|
PC_CFLAGS =
|
|
|
|
|
PC_REQUIRES_PRIVATE = grpc $(PC_REQUIRES_GRPCXX)
|
|
|
|
|
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
|
|
|
|
|
GRPCXX_PC_FILE := $(PC_TEMPLATE)
|
|
|
|
|
|
|
|
|
|
# grpc++_unsecure .pc file
|
|
|
|
|
PC_NAME = gRPC++ unsecure
|
|
|
|
|
PC_DESCRIPTION = C++ wrapper for gRPC without SSL
|
|
|
|
|
PC_CFLAGS =
|
|
|
|
|
PC_REQUIRES_PRIVATE = grpc_unsecure $(PC_REQUIRES_GRPCXX)
|
|
|
|
|
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
|
|
|
|
|
GRPCXX_UNSECURE_PC_FILE := $(PC_TEMPLATE)
|
|
|
|
|
|
|
|
|
|
ifeq ($(MAKECMDGOALS),clean) |
|
|
|
|
NO_DEPS = true
|
|
|
|
|
endif |
|
|
|
@ -1294,15 +1356,15 @@ $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure |
|
|
|
|
|
|
|
|
|
static: static_c static_cxx |
|
|
|
|
|
|
|
|
|
static_c: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a |
|
|
|
|
static_c: pc_c pc_c_unsecure $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a |
|
|
|
|
|
|
|
|
|
static_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a |
|
|
|
|
static_cxx: pc_cxx pc_cxx_unsecure pc_gpr $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a |
|
|
|
|
|
|
|
|
|
shared: shared_c shared_cxx |
|
|
|
|
|
|
|
|
|
shared_c: $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) |
|
|
|
|
shared_c: pc_c pc_c_unsecure pc_gpr $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) |
|
|
|
|
|
|
|
|
|
shared_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.$(SHARED_EXT) |
|
|
|
|
shared_cxx: pc_cxx pc_cxx_unsecure $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.$(SHARED_EXT) |
|
|
|
|
|
|
|
|
|
shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) |
|
|
|
|
grpc_csharp_ext: shared_csharp |
|
|
|
@ -1312,6 +1374,15 @@ plugins: $(PROTOC_PLUGINS) |
|
|
|
|
privatelibs: privatelibs_c privatelibs_cxx |
|
|
|
|
|
|
|
|
|
privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_with_poll.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack_with_poll.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_flags.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a |
|
|
|
|
pc_gpr: $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc |
|
|
|
|
|
|
|
|
|
pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc |
|
|
|
|
|
|
|
|
|
pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc |
|
|
|
|
|
|
|
|
|
pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc |
|
|
|
|
|
|
|
|
|
pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc |
|
|
|
|
|
|
|
|
|
privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a |
|
|
|
|
|
|
|
|
@ -2524,6 +2595,31 @@ ifeq ($(CONFIG),opt) |
|
|
|
|
$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT)
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
$(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc: |
|
|
|
|
$(E) "[MAKE] Generating $@"
|
|
|
|
|
$(Q) mkdir -p $(@D)
|
|
|
|
|
$(Q) echo -e "$(GPR_PC_FILE)" >$@
|
|
|
|
|
|
|
|
|
|
$(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc: |
|
|
|
|
$(E) "[MAKE] Generating $@"
|
|
|
|
|
$(Q) mkdir -p $(@D)
|
|
|
|
|
$(Q) echo -e "$(GRPC_PC_FILE)" >$@
|
|
|
|
|
|
|
|
|
|
$(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc: |
|
|
|
|
$(E) "[MAKE] Generating $@"
|
|
|
|
|
$(Q) mkdir -p $(@D)
|
|
|
|
|
$(Q) echo -e "$(GRPC_UNSECURE_PC_FILE)" >$@
|
|
|
|
|
|
|
|
|
|
$(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc: |
|
|
|
|
$(E) "[MAKE] Generating $@"
|
|
|
|
|
$(Q) mkdir -p $(@D)
|
|
|
|
|
$(Q) echo -e "$(GRPCXX_PC_FILE)" >$@
|
|
|
|
|
|
|
|
|
|
$(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc: |
|
|
|
|
$(E) "[MAKE] Generating $@"
|
|
|
|
|
$(Q) mkdir -p $(@D)
|
|
|
|
|
$(Q) echo -e "$(GRPCXX_UNSECURE_PC_FILE)" >$@
|
|
|
|
|
|
|
|
|
|
ifeq ($(NO_PROTOC),true) |
|
|
|
|
$(GENDIR)/examples/pubsub/empty.pb.cc: protoc_dep_error |
|
|
|
|
$(GENDIR)/examples/pubsub/empty.grpc.pb.cc: protoc_dep_error |
|
|
|
@ -2731,7 +2827,7 @@ install-headers_cxx: |
|
|
|
|
|
|
|
|
|
install-static: install-static_c install-static_cxx |
|
|
|
|
|
|
|
|
|
install-static_c: static_c strip-static_c |
|
|
|
|
install-static_c: static_c strip-static_c install-pkg-config_c |
|
|
|
|
$(E) "[INSTALL] Installing libgpr.a"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr.a $(prefix)/lib/libgpr.a
|
|
|
|
@ -2742,7 +2838,7 @@ install-static_c: static_c strip-static_c |
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(prefix)/lib/libgrpc_unsecure.a
|
|
|
|
|
|
|
|
|
|
install-static_cxx: static_cxx strip-static_cxx |
|
|
|
|
install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx |
|
|
|
|
$(E) "[INSTALL] Installing libgrpc++.a"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a
|
|
|
|
@ -2752,7 +2848,7 @@ install-static_cxx: static_cxx strip-static_cxx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install-shared_c: shared_c strip-shared_c |
|
|
|
|
install-shared_c: shared_c strip-shared_c install-pkg-config_c |
|
|
|
|
ifeq ($(SYSTEM),MINGW32) |
|
|
|
|
$(E) "[INSTALL] Installing gpr.$(SHARED_EXT)"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib
|
|
|
|
@ -2802,7 +2898,7 @@ endif |
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c |
|
|
|
|
install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-config_cxx |
|
|
|
|
ifeq ($(SYSTEM),MINGW32) |
|
|
|
|
$(E) "[INSTALL] Installing grpc++.$(SHARED_EXT)"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib
|
|
|
|
@ -2877,6 +2973,19 @@ else |
|
|
|
|
$(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
|
install-pkg-config_c: pc_gpr pc_c pc_c_unsecure |
|
|
|
|
$(E) "[INSTALL] Installing C pkg-config files"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc $(prefix)/lib/pkgconfig/gpr.pc
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc
|
|
|
|
|
|
|
|
|
|
install-pkg-config_cxx: pc_cxx pc_cxx_unsecure |
|
|
|
|
$(E) "[INSTALL] Installing C++ pkg-config files"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc $(prefix)/lib/pkgconfig/grpc++.pc
|
|
|
|
|
$(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc $(prefix)/lib/pkgconfig/grpc++_unsecure.pc
|
|
|
|
|
|
|
|
|
|
install-certs: etc/roots.pem |
|
|
|
|
$(E) "[INSTALL] Installing root certificates"
|
|
|
|
|
$(Q) $(INSTALL) -d $(prefix)/share/grpc
|
|
|
|
|