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:
--nosource-fix(requires winemaker version 0.5.8 or later) to ensure that the two files are not modified (if using an older version, make the two files read-only 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 configure and make as normal (described elsewhere).