aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-08-18 14:57:03 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-08-18 14:57:03 -0700
commitdf2a7b7e408acf030c208b2516198ae71090e8b8 (patch)
treec3f3c9acce622cf93ad697cec7f36a2c3e17b937 /Makefile
parentc1da23469326ceb1eedb773d4bd17099faa9b0f8 (diff)
Fix build with system c-ares
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 3 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 7ff04e2914..bac91e6755 100644
--- a/Makefile
+++ b/Makefile
@@ -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