From 80eb1454604f71fdcbb17c7fb73bade22031ef81 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 13 Dec 2022 05:44:07 -0600 Subject: add direct source dependency to each library Fix library generation with some CMake generators by including a direct source file dependency for each library. --- crypto/CMakeLists.txt | 2 +- crypto/Makefile.am | 1 + ssl/CMakeLists.txt | 2 +- ssl/Makefile.am | 1 + tls/CMakeLists.txt | 2 +- tls/Makefile.am | 1 + update.sh | 3 +++ 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 8956884..bb43432 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -1009,7 +1009,7 @@ target_include_directories(crypto_obj PUBLIC ../include) -add_library(crypto $) +add_library(crypto $ empty.c) export_symbol(crypto ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym) target_link_libraries(crypto ${PLATFORM_LIBS}) diff --git a/crypto/Makefile.am b/crypto/Makefile.am index bc3d4c2..e380fdf 100644 --- a/crypto/Makefile.am +++ b/crypto/Makefile.am @@ -32,6 +32,7 @@ endif EXTRA_DIST = VERSION EXTRA_DIST += CMakeLists.txt EXTRA_DIST += crypto.sym +EXTRA_DIST += empty.c # needed for a CMake target EXTRA_DIST += compat/strcasecmp.c diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt index 4c7357a..173c3b5 100644 --- a/ssl/CMakeLists.txt +++ b/ssl/CMakeLists.txt @@ -79,7 +79,7 @@ target_include_directories(bs_obj if(BUILD_SHARED_LIBS) add_library(ssl $ $) else() - add_library(ssl $) + add_library(ssl $ empty.c) endif() export_symbol(ssl ${CMAKE_CURRENT_SOURCE_DIR}/ssl.sym) diff --git a/ssl/Makefile.am b/ssl/Makefile.am index 6591ffa..a2155fb 100644 --- a/ssl/Makefile.am +++ b/ssl/Makefile.am @@ -15,6 +15,7 @@ noinst_DATA = remove_bs_objects EXTRA_DIST = VERSION EXTRA_DIST += CMakeLists.txt EXTRA_DIST += ssl.sym +EXTRA_DIST += empty.c CLEANFILES = libssl_la_objects.mk diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index 7827a5e..62dde63 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt @@ -48,7 +48,7 @@ target_include_directories(tls_obj ../include) add_library(tls $ $ - $) + $ empty.c) export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) target_link_libraries(tls ${PLATFORM_LIBS}) diff --git a/tls/Makefile.am b/tls/Makefile.am index 160359c..9b62b22 100644 --- a/tls/Makefile.am +++ b/tls/Makefile.am @@ -8,6 +8,7 @@ lib_LTLIBRARIES = libtls.la EXTRA_DIST = VERSION EXTRA_DIST += CMakeLists.txt EXTRA_DIST += tls.sym +EXTRA_DIST += empty.c CLEANFILES = libtls_la_objects.mk diff --git a/update.sh b/update.sh index c7ff9fb..1feca33 100755 --- a/update.sh +++ b/update.sh @@ -141,6 +141,7 @@ echo "LibreSSL version `cat VERSION`" # copy libcrypto source echo copying libcrypto source rm -f crypto/*.c crypto/*.h +touch crypto/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do dir=`dirname $i` mkdir -p crypto/$dir @@ -231,6 +232,7 @@ done # copy libtls source echo copying libtls source rm -f tls/*.c tls/*.h libtls/src/*.c libtls/src/*.h +touch tls/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' tls/Makefile.am` ; do if [ -e $libtls_src/$i ]; then $CP $libtls_src/$i tls @@ -276,6 +278,7 @@ done # copy libssl source echo "copying libssl source" rm -f ssl/*.c ssl/*.h +touch ssl/empty.c for i in `awk '/SOURCES|HEADERS/ { print $3 }' ssl/Makefile.am` ; do dir=`dirname $i` mkdir -p ssl/$dir -- cgit v1.2.3-55-g6feb