Reorganise makefiles