You can download already compiled versions of the command line mame from mamedev.org. That's probably the best way to go, but with newer versions of mameui (it's called mameui now, not mame32) you can launch games just like you would with the command line mame, and the UI is bypassed. So whichever way you end up going, you don't need to compile if you don't want to.