//-------------------------------------------------------------------------------------------------- static void BuildExecutables ( legato::App& app, const legato::BuildParams_t& buildParams ) //-------------------------------------------------------------------------------------------------- { // Create an Executable Builder object. ExecutableBuilder_t exeBuilder(buildParams); // For each executable, auto& exeList = app.Executables(); for (auto i = exeList.begin(); i != exeList.end(); i++) { legato::Executable& exe = i->second; // Put the intermediate build output files under a directory named after the executable. std::string objOutputDir = legato::CombinePath(buildParams.ObjOutputDir(), exe.CName()); // Auto-generate the source code file containing main() and add it to the default component. exeBuilder.GenerateMain(exe, objOutputDir); // Build the executable. exeBuilder.Build(exe, objOutputDir); } }