final build script used for M7 modules