aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-08-12 11:27:30 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-08-12 11:27:30 -0700
commitb1b2115a26e53c32770248140644f7a34c11e0a2 (patch)
tree1e9cb95514d72a1887581ba19c787801ed9d3c30 /Makefile
parent42a6c267c5fcea5ebc4b842e8f9f829ef9eeec58 (diff)
Fix ruby build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 21580188b6..7d2253c5d4 100644
--- a/Makefile
+++ b/Makefile
@@ -656,7 +656,24 @@ endif
CARES_PKG_CONFIG = false
-ifeq ($(HAS_SYSTEM_CARES),true)
+ifeq ($(HAS_SYSTEM_CARES),false)
+ifeq ($(HAS_EMBEDDED_CARES), true)
+EMBED_CARES ?= true
+else
+DEP_MISSING += cares
+EMBED_CARES ?= broken
+endif
+else
+EMBED_CARES ?= false
+endif
+
+ifeq ($(EMBED_CARES),true)
+CARES_DEP = $(LIBDIR)/$(CONFIG)/c-ares/libcares.a
+CPPFLAGS := -Ithird_party/c-ares $(CPPFLAGS)
+LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS)
+CARES_CFLAGS_EXTRA += $(findstring -m32,$(CFLAGS))
+CARES_CFLAGS_EXTRA += -Wno-invalid-source-encoding
+else
ifeq ($(HAS_PKG_CONFIG),true)
CARES_PKG_CONFIG = true
PC_REQUIRES_GRPC += libcares
@@ -671,16 +688,6 @@ else
PC_LIBS_GRPC += -lcares
LIBS += libcares
endif
-else
-ifeq ($(HAS_EMBEDDED_CARES),true)
-CARES_DEP = $(LIBDIR)/$(CONFIG)/c-ares/libcares.a
-CPPFLAGS := -Ithird_party/c-ares $(CPPFLAGS)
-LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS)
-CARES_CFLAGS_EXTRA += $(findstring -m32,$(CFLAGS))
-CARES_CFLAGS_EXTRA += -Wno-invalid-source-encoding
-else
-DEP_MISSING += c-ares
-endif
endif
LIBS_CARES = cares