From 9b88fa46bb727d811d95f7696d91cbc07278f65e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sat, 8 Jul 2017 17:46:16 -0500 Subject: generate the crypto export symbol list at build time we currently do it at configure time, which makes this a generated source, but generated sources should be cleaned up, which breaks 'make clean; make' --- crypto/Makefile.am | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'crypto') diff --git a/crypto/Makefile.am b/crypto/Makefile.am index 701cd4a..046a623 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am @@ -18,6 +18,80 @@ EXTRA_DIST += compat/strcasecmp.c BUILT_SOURCES = crypto_portable.sym CLEANFILES = crypto_portable.sym +crypto_portable.sym: + -echo "generating crypto_portable.sym ..." + -cp $(top_srcdir)/crypto/crypto.sym crypto_portable.sym + -chmod u+w crypto_portable.sym +if !HAVE_ARC4RANDOM_BUF + -echo arc4random >> crypto_portable.sym + -echo arc4random_buf >> crypto_portable.sym + -echo arc4random_uniform >> crypto_portable.sym +if !HAVE_GETENTROPY + -echo getentropy >> crypto_portable.sym +endif +endif +if !HAVE_ASPRINTF + -echo asprintf >> crypto_portable.sym + -echo vasprintf >> crypto_portable.sym +endif +if !HAVE_EXPLICIT_BZERO + -echo explicit_bzero >> crypto_portable.sym +endif +if !HAVE_FREEZERO + -echo freezero >> crypto_portable.sym +endif +if !HAVE_INET_PTON + -echo inet_pton >> crypto_portable.sym +endif +if !HAVE_REALLOCARRAY + -echo reallocarray >> crypto_portable.sym +endif +if !HAVE_RECALLOCARRAY + -echo recallocarray >> crypto_portable.sym +endif +if !HAVE_STRLCAT + -echo strlcat >> crypto_portable.sym +endif +if !HAVE_STRLCPY + -echo strlcpy >> crypto_portable.sym +endif +if !HAVE_STRNDUP + -echo strndup >> crypto_portable.sym +endif +if !HAVE_STRNLEN + -echo strnlen >> crypto_portable.sym +endif +if !HAVE_STRSEP + -echo strsep >> crypto_portable.sym +endif +if !HAVE_TIMEGM + -echo timegm >> crypto_portable.sym +endif +if !HAVE_TIMINGSAFE_BCMP + -echo timingsafe_bcmp >> crypto_portable.sym +endif +if !HAVE_TIMINGSAFE_MEMCMP + -echo timingsafe_memcmp >> crypto_portable.sym +endif +if HOST_CPU_IS_INTEL + -echo OPENSSL_ia32cap_P >> crypto_portable.sym +endif +if HOST_WIN + -echo posix_perror >> crypto_portable.sym + -echo posix_fopen >> crypto_portable.sym + -echo posix_fgets >> crypto_portable.sym + -echo posix_open >> crypto_portable.sym + -echo posix_rename >> crypto_portable.sym + -echo posix_connect >> crypto_portable.sym + -echo posix_close >> crypto_portable.sym + -echo posix_read >> crypto_portable.sym + -echo posix_write >> crypto_portable.sym + -echo posix_getsockopt >> crypto_portable.sym + -echo posix_setsockopt >> crypto_portable.sym + -grep -v BIO_s_log crypto_portable.sym > crypto_portable.sym.tmp + -mv crypto_portable.sym.tmp crypto_portable.sym +endif + libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined -export-symbols crypto_portable.sym libcrypto_la_LIBADD = libcompat.la if !HAVE_EXPLICIT_BZERO -- cgit v1.2.3-55-g6feb