Alexandre Julliard : makefiles: Allow modules to link to their own import library.

Alexandre Julliard julliard at winehq.org
Thu Nov 19 16:10:22 CST 2020


Module: wine
Branch: master
Commit: be8a81b54c7adf1e77d9411d337b9227e0eb119f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=be8a81b54c7adf1e77d9411d337b9227e0eb119f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Nov 19 11:40:26 2020 +0100

makefiles: Allow modules to link to their own import library.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/makedep.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/makedep.c b/tools/makedep.c
index f179f3afa5e..c30c21ff27d 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2218,9 +2218,6 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra
         const char *name = get_base_name( imports.str[i] );
         const char *lib = NULL;
 
-        /* skip module's own importlib, its object files will be linked directly */
-        if (make->importlib && !strcmp( make->importlib, imports.str[i] )) continue;
-
         for (j = 0; j < subdirs.count; j++)
         {
             if (submakes[j]->importlib && !strcmp( submakes[j]->importlib, name ))
@@ -3117,7 +3114,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
     {
         if ((source->file->flags & FLAG_C_UNIX) && *dll_ext)
             strarray_add( &make->unixobj_files, strmake( "%s.o", obj ));
-        else if (!is_dll_src && (!(source->file->flags & FLAG_C_IMPLIB) || (make->importlib && strarray_exists( &make->imports, make->importlib ))))
+        else if (!is_dll_src && !(source->file->flags & FLAG_C_IMPLIB))
             strarray_add( &make->object_files, strmake( "%s.o", obj ));
         else
             strarray_add( &make->clean_files, strmake( "%s.o", obj ));
@@ -3136,7 +3133,10 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
     }
     if (need_cross)
     {
-        strarray_add( is_dll_src ? &make->clean_files : &make->crossobj_files, strmake( "%s.cross.o", obj ));
+        if (!is_dll_src && !(source->file->flags & FLAG_C_IMPLIB))
+            strarray_add( &make->crossobj_files, strmake( "%s.cross.o", obj ));
+        else
+            strarray_add( &make->clean_files, strmake( "%s.cross.o", obj ));
         output( "%s.cross.o: %s\n", obj_dir_path( make, obj ), source->filename );
         output( "\t$(CROSSCC) -c -o $@ %s", source->filename );
         output_filenames( defines );




More information about the wine-cvs mailing list