Issue #2133327 Refactor make files to improve maintainability