makefile for mingw; passes MSVC build
template: factored out common lookup code