Commit 3ad95e03 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

makedep: Link importlib object files into module only when it's explicitly imported.

To prevent msvcrt linking its own importlib into DLL. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 22a9b474
MODULE = dinput.dll MODULE = dinput.dll
IMPORTLIB = dinput IMPORTLIB = dinput
IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32 IMPORTS = dinput dxguid uuid comctl32 ole32 user32 advapi32
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700 EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS) EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
......
MODULE = dinput8.dll MODULE = dinput8.dll
IMPORTLIB = dinput8 IMPORTLIB = dinput8
IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32 IMPORTS = dinput8 dxguid uuid comctl32 ole32 user32 advapi32
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800 EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS) EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
PARENTSRC = ../dinput PARENTSRC = ../dinput
......
...@@ -2193,6 +2193,9 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra ...@@ -2193,6 +2193,9 @@ 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 < top_makefile->subdirs.count; j++) for (j = 0; j < top_makefile->subdirs.count; j++)
{ {
const struct makefile *submake = top_makefile->submakes[j]; const struct makefile *submake = top_makefile->submakes[j];
...@@ -3070,7 +3073,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour ...@@ -3070,7 +3073,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) else if (!is_dll_src && (!(source->file->flags & FLAG_C_IMPLIB) || (make->importlib && strarray_exists( &make->imports, make->importlib ))))
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 ));
......
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