move all makefiles to a better make system across the repository
this change reduces code duplication in makefiles