aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-23 02:23:49 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-23 03:30:15 +0200
commit010f1e7b62cbe6045f1211d59c5c492dc0c21507 (patch)
tree054b99bf50017d2cff66f2ac79e08bd95ac87163 /templates
parentc43b34517f5410314a8f18ed48df60ea9ce9b17c (diff)
More work in not having to compile OpenSSL.
Diffstat (limited to 'templates')
-rw-r--r--templates/Makefile.template29
1 files changed, 20 insertions, 9 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template
index fdcbb140a4..9ca55f4f24 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -42,6 +42,9 @@
if not m:
return filename
return '$(GENDIR)/' + m.group(1) + '.pb.cc $(GENDIR)/' + m.group(1) + '.grpc.pb.cc'
+
+ sources_that_need_openssl = set()
+ sources_that_don_t_need_openssl = set()
%>
@@ -1080,15 +1083,6 @@ endif
else
% endif
-ifneq ($(OPENSSL_DEP),)
-# This is to ensure the embedded OpenSSL is built beforehand, properly
-# installing headers to their final destination on the drive. We need this
-# otherwise parallel compilation will fail if a source is compiled first.
-% for src in lib.src:
-${src}: $(OPENSSL_DEP)
-% endfor
-endif
-
$(LIBDIR)/$(CONFIG)/lib${lib.name}.a: $(ZLIB_DEP) $(OPENSSL_DEP)\
## The else here corresponds to the if secure earlier.
% else:
@@ -1136,6 +1130,7 @@ ifeq ($(SYSTEM),Darwin)
endif
<%
+
if lib.language == 'c++':
ld = '$(LDXX)'
else:
@@ -1158,6 +1153,11 @@ endif
if lib.get('secure', 'check') == 'yes':
common = common + ' $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS)'
+ for src in lib.src:
+ sources_that_need_openssl.add(src)
+ else:
+ for src in lib.src:
+ sources_that_don_t_need_openssl.add(src)
if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check':
lib_deps = lib_deps + ' $(OPENSSL_DEP)'
@@ -1340,6 +1340,17 @@ endif
% endif
</%def>
+ifneq ($(OPENSSL_DEP),)
+# This is to ensure the embedded OpenSSL is built beforehand, properly
+# installing headers to their final destination on the drive. We need this
+# otherwise parallel compilation will fail if a source is compiled first.
+% for src in sorted(sources_that_need_openssl):
+% if src not in sources_that_don_t_need_openssl:
+${src}: $(OPENSSL_DEP)
+% endif
+% endfor
+endif
+
.PHONY: all strip tools \
dep_error openssl_dep_error openssl_dep_message git_update stop \
buildtests buildtests_c buildtests_cxx \