Port makefile improvements across from euphemus