Factored Makefile into Makefile and common.mk. Added support for arduino libraries.