So how do we actually build the Wine built-in Dll? The easiest way is to get Winemaker to do the hard work for us. For the simple example we have two source files (the wrapper and the spec file). We also have the 3rd party header and library files of course.
Put the two source files in a suitable directory and then use winemaker to create the build framework, including configure script, makefile etc. You will want to use the following options of winemaker:
--nosource-fix (requires winemaker version 0.5.8 or later) to ensure that the two files are not modified. (If using an older version of winemaker then make the two files readonly and ignore the complaints about being unable to modify them).
--dll --single-target MyWin --nomfc to specify the target
-DMightNeedSomething -I3rd_party_include -L3rd_party_lib -lxxxx -lyyyy where these are the locations of the header files etc.
After running winemaker I like to edit the Makefile to add the line CEXTRA = -Wall just before the DEFINES =.
Then simply run the configure and make as normal (described elsewhere).