[PATCH 6/9] makedep: Allow compiling bundled libraries as shared libraries.

Zebediah Figura zfigura at codeweavers.com
Mon Nov 29 11:01:19 CST 2021


libvkd3d 1.2 cannot be used as a static library, even in ELF format—both
libvkd3d and libvkd3d-shader define the same symbols (e.g. vkd3d_dbg_env_name).

We also need to access the same vkd3d objects from multiple DLLs (d3d12 and
dxgi). While the current implementation of vkd3d actually allows this to work as
long as both libraries are kept in synchronization, this seems like an
implementation detail which we should not rely on.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 tools/makedep.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/makedep.c b/tools/makedep.c
index 2301ecf191e..135c49e1c0c 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -4128,7 +4128,13 @@ static void load_sources( struct makefile *make )
     make->install_dev   = get_expanded_make_var_array( make, "INSTALL_DEV" );
     make->extra_targets = get_expanded_make_var_array( make, "EXTRA_TARGETS" );
 
-    if (make->extlib) make->staticlib = make->extlib;
+    if (make->extlib)
+    {
+        if (!strcmp( make->extlib + strlen( make->extlib ) - 2, ".a" ))
+            make->staticlib = make->extlib;
+        else
+            make->module = make->extlib;
+    }
     if (make->staticlib) make->module = make->staticlib;
 
     make->disabled   = make->obj_dir && strarray_exists( &disabled_dirs, make->obj_dir );
-- 
2.34.0




More information about the wine-devel mailing list