diff options
author | Yuchen Zeng <zyc@google.com> | 2016-08-18 14:57:03 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-08-18 14:57:03 -0700 |
commit | df2a7b7e408acf030c208b2516198ae71090e8b8 (patch) | |
tree | c3f3c9acce622cf93ad697cec7f36a2c3e17b937 /Makefile | |
parent | c1da23469326ceb1eedb773d4bd17099faa9b0f8 (diff) |
Fix build with system c-ares
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -675,18 +675,13 @@ CPPFLAGS := -Ithird_party/c-ares -Isrc/c-ares $(CPPFLAGS) LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS) else ifeq ($(HAS_PKG_CONFIG),true) -CARES_PKG_CONFIG = true PC_REQUIRES_GRPC += libcares CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libcares) -LDFLAGS_CARES_PKG_CONFIG = $(shell $(PKG_CONFIG) --libs-only-L libcares) -ifeq ($(SYSTEM),Linux) -ifneq ($(LDFLAGS_CARES_PKG_CONFIG),) -LDFLAGS_CARES_PKG_CONFIG += $(shell $(PKG_CONFIG) --libs-only-L libcares | sed s/L/Wl,-rpath,/) -endif -endif +LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libcares) +LIBS += $(patsubst -l%,%,$(shell $(PKG_CONFIG) --libs-only-l libcares)) else PC_LIBS_GRPC += -lcares -LIBS += libcares +LIBS += cares endif endif |