A "simple" makefile for Arduino

Guys,
It would seem that the borrowed sketch that I am trying to compile suffers from the decease that the Adruino IDE causes. People do not code properly. Things are not defined in all the correct places etc etc. I think a good enhancement to the Aruino IDE would be enforcing correct header file usage. And this has been my gripe with the Arduino IDE from the word go. I started coding in such a manner that I could not move my sketch to another IDE. It was a mess and hence the decision to use Visual C++ with a makefile for borrowed sketches and Eclipse for project from scratch.

So most of the Makefiles that I have tested over the last two days would probably work fine if the code was written in any decent manner. I am going to attempt to fix the code and then report back.