I have built a makefile to automatically compile Arduino programs and libraries, the makefile even searches recursivelly for source code (for both the program and the libraries). I've included the default lib (called, creatively, as default), and modified it a little (I've included a Serial.printf method, to help you guys).
The makefile also checks the size of the application and uploads it to the board (make upload).
Here's the git repository: http://github.com/takanuva/arduino-makefile
Let me know what you think! =D Thanks, and enjoy. ^^