makefiles: Allow modules to link to their own import library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
27b20c1db5
commit
be8a81b54c
|
@ -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 *name = get_base_name( imports.str[i] );
|
||||||
const char *lib = NULL;
|
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++)
|
for (j = 0; j < subdirs.count; j++)
|
||||||
{
|
{
|
||||||
if (submakes[j]->importlib && !strcmp( submakes[j]->importlib, name ))
|
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)
|
if ((source->file->flags & FLAG_C_UNIX) && *dll_ext)
|
||||||
strarray_add( &make->unixobj_files, strmake( "%s.o", obj ));
|
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 ));
|
strarray_add( &make->object_files, strmake( "%s.o", obj ));
|
||||||
else
|
else
|
||||||
strarray_add( &make->clean_files, strmake( "%s.o", obj ));
|
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)
|
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( "%s.cross.o: %s\n", obj_dir_path( make, obj ), source->filename );
|
||||||
output( "\t$(CROSSCC) -c -o $@ %s", source->filename );
|
output( "\t$(CROSSCC) -c -o $@ %s", source->filename );
|
||||||
output_filenames( defines );
|
output_filenames( defines );
|
||||||
|
|
Loading…
Reference in New Issue