Added more Makefile options.

Changed Makefile to support optional dependencies and tests compilation.
Added optional DESTDIR and OBJDIR directories.