Fixed Makefile to work well in submodules environments