Refactoring Makefiles