diff --git a/dlls/dinput/Makefile.in b/dlls/dinput/Makefile.in index 3b046d61d44..ae65fd4d93e 100644 --- a/dlls/dinput/Makefile.in +++ b/dlls/dinput/Makefile.in @@ -1,6 +1,6 @@ MODULE = dinput.dll IMPORTLIB = dinput -IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32 +IMPORTS = dinput dxguid uuid comctl32 ole32 user32 advapi32 EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700 EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS) diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in index 0ede9f0fb16..5f0dce97caa 100644 --- a/dlls/dinput8/Makefile.in +++ b/dlls/dinput8/Makefile.in @@ -1,6 +1,6 @@ MODULE = dinput8.dll IMPORTLIB = dinput8 -IMPORTS = dxguid uuid comctl32 ole32 user32 advapi32 +IMPORTS = dinput8 dxguid uuid comctl32 ole32 user32 advapi32 EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800 EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS) PARENTSRC = ../dinput diff --git a/tools/makedep.c b/tools/makedep.c index 6d1500534dc..4cc0e784c76 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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 *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++) { const struct makefile *submake = top_makefile->submakes[j]; @@ -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) 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 )); else strarray_add( &make->clean_files, strmake( "%s.o", obj ));