Here's how I got UQM to build.

I used DJWillis' Windows compilation toolchain available at http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1918

Put the source code somewhere.  I put mine in c:\devkitGP2X\projects\uqm-0.5.0, so I'll use that in the example below.

You'll need an environment variable set for BUILD_HOST=Linux.  I set mine globally in Windows by going to control panel->system then go to the advanced tab and click Environment Variables.  Under 'User variables for <username>' click new.  In "Variable Name" put BUILD_HOST.  In 'Variable value' put Linux.  Click OK a couple of times and you're done.

Fire up Minsys using c:\devkitGP2X\minsys\msys.bat

cd /c/devkitGP2X/projects/uqm-0.5.0
./build.sh uqm

When I make changes and want to recompile, I just delete the release folder under c:\devkitGP2X\projects\uqm-0.5.0\obj and then './build.sh uqm' again.

If you run './build.sh uqm config', you may have to edit build.vars to get things working again.  I've tried to put everything needed in build.vars.in to make the config work right, but I usually check build.vars afterwards just to be sure.

If you need any help getting it to compile, shoot me an e-mail at danny.welch@gmail.com and I'll try to help.