msm: makefile restructuring