Added makefile and reordered source code so that it can be compiled using arduino-mk (https://github.com/sudar/Arduino-Makefile/)