Requested Change to the build system

Dmitry Timoshkov dmitry at
Sun May 19 21:45:25 CDT 2002

"Steven Edwards" <Steven_Ed4153 at> wrote:

> In the ReactOS tree we have a "make implib" rule to generate all of the
> import 
> Libs for our shared libs. This way we are not dependant on the mingw
> win32api.
> I think the wine tree needs to do something similer. Once this is done
> we can 
> go ahead and build the import libs for ntdll, msvcrt and User32 that are
> needed 
> for the wine dlls. 
> The command line is something like this
> dlltool --as=as --dllname user32.dll --def user32.spec.def --output-lib
> libuser32.a

I would recommend the following command lines to build both import library
and dll with *correct* import/export tables:

DLLWRAPFLAGS = -mno-windows -k --def $(MODULE).spec.def -Wl,--kill-at,--enable-stdcall-fixup

(probably --enable-stdcall-fixup is now obsoleted by recent winebuild changes)

$(RM) $(TOPOBJDIR)/dlls/lib$(MODULE).a
$(DLLTOOL) --kill-at --input-def $(MODULE).spec.def --output-lib lib$(MODULE).a
$(CP) lib$(MODULE).a $(TOPOBJDIR)/dlls/lib$(MODULE).a

You need dlltool from binutils CVS because my fix regarding decorated/non-decorated
imports/exports haven't found its way to 2.12 yet. This fix allows to not require
to have *two* .def file sets (with decorated and non-decorated exports as in ReactOS).

Also, since $(MODULE) has an extension included now, you need some workaround
for this.


More information about the wine-devel mailing list