Make generated .pc files list themselves as libraries

pull/2309/head
murgatroid99 10 years ago
parent 775eaec770
commit 4fed2127b7
  1. 7
      Makefile
  2. 7
      templates/Makefile.template

@ -333,7 +333,7 @@ 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)
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} $(PC_LIB)\nLibs.private: $(PC_LIBS_PRIVATE)
# gpr .pc file
PC_NAME = gRPC Portable Runtime
@ -341,6 +341,7 @@ PC_DESCRIPTION = gRPC Portable Runtime
PC_CFLAGS = -pthread
PC_REQUIRES_PRIVATE =
PC_LIBS_PRIVATE = -lpthread
PC_LIB = -lgpr
ifeq ($(SYSTEM),Darwin)
PC_LIBS_PRIVATE += -lrt
endif
@ -531,6 +532,7 @@ 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)
PC_LIB = -lgrpc
GRPC_PC_FILE := $(PC_TEMPLATE)
# gprc_unsecure .pc file
@ -539,6 +541,7 @@ PC_DESCRIPTION = high performance general RPC framework without SSL
PC_CFLAGS =
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC)
PC_LIB = -lgrpc
GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE)
PROTOBUF_PKG_CONFIG = false
@ -588,6 +591,7 @@ PC_DESCRIPTION = C++ wrapper for gRPC
PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
GRPCXX_PC_FILE := $(PC_TEMPLATE)
# grpc++_unsecure .pc file
@ -596,6 +600,7 @@ PC_DESCRIPTION = C++ wrapper for gRPC without SSL
PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc_unsecure $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
GRPCXX_UNSECURE_PC_FILE := $(PC_TEMPLATE)
ifeq ($(MAKECMDGOALS),clean)

@ -357,7 +357,7 @@ Description: $(PC_DESCRIPTION)\n\
Version: $(VERSION)\n\
Cflags: -I${'\$${includedir}'} $(PC_CFLAGS)\n\
Requires.private: $(PC_REQUIRES_PRIVATE)\n\
Libs: -L${'\$${libdir}'}\n\
Libs: -L${'\$${libdir}'} $(PC_LIB)\n\
Libs.private: $(PC_LIBS_PRIVATE)
# gpr .pc file
@ -366,6 +366,7 @@ PC_DESCRIPTION = gRPC Portable Runtime
PC_CFLAGS = -pthread
PC_REQUIRES_PRIVATE =
PC_LIBS_PRIVATE = -lpthread
PC_LIB = -lgpr
ifeq ($(SYSTEM),Darwin)
PC_LIBS_PRIVATE += -lrt
endif
@ -556,6 +557,7 @@ 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)
PC_LIB = -lgrpc
GRPC_PC_FILE := $(PC_TEMPLATE)
# gprc_unsecure .pc file
@ -564,6 +566,7 @@ PC_DESCRIPTION = high performance general RPC framework without SSL
PC_CFLAGS =
PC_REQUIRES_PRIVATE = $(PC_REQUIRES_GRPC)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPC)
PC_LIB = -lgrpc
GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE)
PROTOBUF_PKG_CONFIG = false
@ -613,6 +616,7 @@ PC_DESCRIPTION = C++ wrapper for gRPC
PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
GRPCXX_PC_FILE := $(PC_TEMPLATE)
# grpc++_unsecure .pc file
@ -621,6 +625,7 @@ PC_DESCRIPTION = C++ wrapper for gRPC without SSL
PC_CFLAGS =
PC_REQUIRES_PRIVATE = grpc_unsecure $(PC_REQUIRES_GRPCXX)
PC_LIBS_PRIVATE = $(PC_LIBS_GRPCXX)
PC_LIB = -lgrpc++
GRPCXX_UNSECURE_PC_FILE := $(PC_TEMPLATE)
ifeq ($(MAKECMDGOALS),clean)

Loading…
Cancel
Save