aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-02-20 17:33:16 -0800
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-02-20 17:33:16 -0800
commit6a88c2523a1e03286ec93c1174f2bcd577b59b1c (patch)
tree3979e0daf77b148074ba90a1b82a0411c177966b
parent16ffd653c78213d647157fbc84a1c88667a4795f (diff)
parentec0430335d5a87026f6350548372cf768894ce96 (diff)
Merge pull request #690 from ctiller/mac2
Fix in tree build of openssl on mac
-rw-r--r--Makefile5
-rw-r--r--templates/Makefile.template5
2 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5af091d334..a8d81f725b 100644
--- a/Makefile
+++ b/Makefile
@@ -292,8 +292,9 @@ ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),false)
ifeq ($(HAS_EMBEDDED_OPENSSL_ALPN),true)
OPENSSL_DEP = $(LIBDIR)/$(CONFIG)/openssl/libssl.a
OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/openssl/libssl.a $(LIBDIR)/$(CONFIG)/openssl/libcrypto.a
-CPPFLAGS += -Ithird_party/openssl/include
-LDFLAGS += -L$(LIBDIR)/$(CONFIG)/openssl
+# need to prefix these to ensure overriding system libraries
+CPPFLAGS := -Ithird_party/openssl/include $(CPPFLAGS)
+LDFLAGS := -L$(LIBDIR)/$(CONFIG)/openssl $(LDFLAGS)
LIBS_SECURE = dl
else
NO_SECURE = true
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 32af0263fa..0ac901f69b 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -309,8 +309,9 @@ ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),false)
ifeq ($(HAS_EMBEDDED_OPENSSL_ALPN),true)
OPENSSL_DEP = $(LIBDIR)/$(CONFIG)/openssl/libssl.a
OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/openssl/libssl.a $(LIBDIR)/$(CONFIG)/openssl/libcrypto.a
-CPPFLAGS += -Ithird_party/openssl/include
-LDFLAGS += -L$(LIBDIR)/$(CONFIG)/openssl
+# need to prefix these to ensure overriding system libraries
+CPPFLAGS := -Ithird_party/openssl/include $(CPPFLAGS)
+LDFLAGS := -L$(LIBDIR)/$(CONFIG)/openssl $(LDFLAGS)
LIBS_SECURE = dl
else
NO_SECURE = true