Generates mantle .m file