diff options
author | kinichiro <kinichiro.inoguchi@gmail.com> | 2020-09-20 13:37:52 +0900 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2020-10-04 03:50:18 -0500 |
commit | 5a29b0472d5d0d1aa9936e430a87299fdb0f17ba (patch) | |
tree | 288f41dc8dbe79fc1beba2352b992f5734f859eb | |
parent | fe42a8011b25797afa48cf0359c7e2753b2ece5f (diff) | |
download | portable-5a29b0472d5d0d1aa9936e430a87299fdb0f17ba.tar.gz portable-5a29b0472d5d0d1aa9936e430a87299fdb0f17ba.tar.bz2 portable-5a29b0472d5d0d1aa9936e430a87299fdb0f17ba.zip |
Link crypto and ssl object files directly instead of static library
- Output object files list variable for libcrypto and libssl to .mk file.
- Include object files list variable .mk from tls/Makefile
- Link .lo files directly instead of static library for libtls.
-rw-r--r-- | apps/nc/Makefile.am | 2 | ||||
-rw-r--r-- | crypto/Makefile.am | 13 | ||||
-rw-r--r-- | ssl/Makefile.am | 9 | ||||
-rw-r--r-- | tls/Makefile.am | 11 |
4 files changed, 31 insertions, 4 deletions
diff --git a/apps/nc/Makefile.am b/apps/nc/Makefile.am index 135ff4b..d678f1e 100644 --- a/apps/nc/Makefile.am +++ b/apps/nc/Makefile.am | |||
@@ -12,7 +12,7 @@ endif | |||
12 | EXTRA_DIST = nc.1 | 12 | EXTRA_DIST = nc.1 |
13 | EXTRA_DIST += CMakeLists.txt | 13 | EXTRA_DIST += CMakeLists.txt |
14 | 14 | ||
15 | nc_LDFLAGS = $(abs_top_builddir)/crypto/.libs/libcompat.a | 15 | nc_LDFLAGS = $(abs_top_builddir)/crypto/.libs/libcrypto.a |
16 | 16 | ||
17 | nc_LDADD = $(abs_top_builddir)/tls/libtls.la | 17 | nc_LDADD = $(abs_top_builddir)/tls/libtls.la |
18 | nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD) | 18 | nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD) |
diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 7fcfc02..97a84e1 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am | |||
@@ -20,6 +20,7 @@ EXTRA_DIST += compat/strcasecmp.c | |||
20 | 20 | ||
21 | BUILT_SOURCES = crypto_portable.sym | 21 | BUILT_SOURCES = crypto_portable.sym |
22 | CLEANFILES = crypto_portable.sym | 22 | CLEANFILES = crypto_portable.sym |
23 | CLEANFILES += libcrypto_la_objects.mk | ||
23 | 24 | ||
24 | crypto_portable.sym: crypto.sym Makefile | 25 | crypto_portable.sym: crypto.sym Makefile |
25 | -echo "generating crypto_portable.sym ..." | 26 | -echo "generating crypto_portable.sym ..." |
@@ -93,8 +94,20 @@ if HOST_WIN | |||
93 | -mv crypto_portable.sym.tmp crypto_portable.sym | 94 | -mv crypto_portable.sym.tmp crypto_portable.sym |
94 | endif | 95 | endif |
95 | 96 | ||
97 | libcrypto_la_objects.mk: Makefile | ||
98 | @echo "libcrypto_la_objects= $(libcrypto_la_OBJECTS)" \ | ||
99 | | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \ | ||
100 | > libcrypto_la_objects.mk | ||
101 | @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \ | ||
102 | | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \ | ||
103 | >> libcrypto_la_objects.mk | ||
104 | @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \ | ||
105 | | sed 's/ */ $$\(abs_top_builddir\)\/crypto\//g' \ | ||
106 | >> libcrypto_la_objects.mk | ||
107 | |||
96 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym | 108 | libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym |
97 | EXTRA_libcrypto_la_DEPENDENCIES = crypto_portable.sym | 109 | EXTRA_libcrypto_la_DEPENDENCIES = crypto_portable.sym |
110 | EXTRA_libcrypto_la_DEPENDENCIES += libcrypto_la_objects.mk | ||
98 | libcrypto_la_LIBADD = libcompat.la | 111 | libcrypto_la_LIBADD = libcompat.la |
99 | if !HAVE_EXPLICIT_BZERO | 112 | if !HAVE_EXPLICIT_BZERO |
100 | libcrypto_la_LIBADD += libcompatnoopt.la | 113 | libcrypto_la_LIBADD += libcompatnoopt.la |
diff --git a/ssl/Makefile.am b/ssl/Makefile.am index dded59f..4c4e594 100644 --- a/ssl/Makefile.am +++ b/ssl/Makefile.am | |||
@@ -6,6 +6,15 @@ EXTRA_DIST = VERSION | |||
6 | EXTRA_DIST += CMakeLists.txt | 6 | EXTRA_DIST += CMakeLists.txt |
7 | EXTRA_DIST += ssl.sym | 7 | EXTRA_DIST += ssl.sym |
8 | 8 | ||
9 | CLEANFILES = libssl_la_objects.mk | ||
10 | |||
11 | EXTRA_libssl_la_DEPENDENCIES = libssl_la_objects.mk | ||
12 | |||
13 | libssl_la_objects.mk: Makefile | ||
14 | @echo "libssl_la_objects= $(libssl_la_OBJECTS)" \ | ||
15 | | sed 's/ */ $$\(abs_top_builddir\)\/ssl\//g' \ | ||
16 | > libssl_la_objects.mk | ||
17 | |||
9 | libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym | 18 | libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym |
10 | libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(PLATFORM_LDADD) | 19 | libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(PLATFORM_LDADD) |
11 | 20 | ||
diff --git a/tls/Makefile.am b/tls/Makefile.am index c4790a4..4cea3a2 100644 --- a/tls/Makefile.am +++ b/tls/Makefile.am | |||
@@ -1,5 +1,8 @@ | |||
1 | include $(top_srcdir)/Makefile.am.common | 1 | include $(top_srcdir)/Makefile.am.common |
2 | 2 | ||
3 | -include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk | ||
4 | -include $(abs_top_builddir)/ssl/libssl_la_objects.mk | ||
5 | |||
3 | lib_LTLIBRARIES = libtls.la | 6 | lib_LTLIBRARIES = libtls.la |
4 | 7 | ||
5 | EXTRA_DIST = VERSION | 8 | EXTRA_DIST = VERSION |
@@ -7,9 +10,11 @@ EXTRA_DIST += CMakeLists.txt | |||
7 | EXTRA_DIST += tls.sym | 10 | EXTRA_DIST += tls.sym |
8 | 11 | ||
9 | libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym | 12 | libtls_la_LDFLAGS = -version-info @LIBTLS_VERSION@ -no-undefined -export-symbols $(top_srcdir)/tls/tls.sym |
10 | libtls_la_LDFLAGS += $(abs_top_builddir)/ssl/.libs/libssl.a | 13 | libtls_la_LIBADD = $(libcrypto_la_objects) |
11 | libtls_la_LDFLAGS += $(abs_top_builddir)/crypto/.libs/libcrypto.a | 14 | libtls_la_LIBADD += $(libcompat_la_objects) |
12 | libtls_la_LIBADD = $(PLATFORM_LDADD) | 15 | libtls_la_LIBADD += $(libcompatnoopt_la_objects) |
16 | libtls_la_LIBADD += $(libssl_la_objects) | ||
17 | libtls_la_LIBADD += $(PLATFORM_LDADD) | ||
13 | 18 | ||
14 | libtls_la_CPPFLAGS = $(AM_CPPFLAGS) | 19 | libtls_la_CPPFLAGS = $(AM_CPPFLAGS) |
15 | if OPENSSLDIR_DEFINED | 20 | if OPENSSLDIR_DEFINED |