Add MinGW platform makefile and related source changes