This is a very simple Makefile which knows how to build Arduino sketches.
Until March 2012, this was simply posted on my website where you can still find what documentation exists.
If you're using Debian or Ubuntu, you can find this in the arduino-core package.