Import hack from DH-acc for compiling under mingw-w64.
Added recursive WAD generation.