Preferred method will be using autoconf & automake with ./configure but that requires single-hosting Mingw which is bit complicated. You can also use CYGWIN to compile.