Refactored make files for building the project.