major changes to makefiles for easy building of repository