Makefile support for compiling with libraries linking, sensors init fix