makefile changes to enable build independently and as submodule