Commit be8a81b5 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 27b20c1d
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment