i wrote this 15 years ago but it still works on this recent ubuntu system if you supply a couple of variables to make
make run CC=i686-w64-mingw32-gcc WINE=wine
no rust thoin debian/ubuntu the package to install to get i686-w64-mingw32-gcc and the attendant header files and libraries is gcc-mingw-w64-i686
amusingly the executables i built 15 years ago still run on current gnu/linux; not sure if that would be true for things linked with libx11 and libxext, certainly not libgtk