Generalized the root Makefile