%selectfile NULL_FILE
%if EXISTS("_COMMONENTRY_") == 0
%assign _COMMONENTRY_ = 1
%include "extmodemaplib.tlc"
%include "extmodetasklib.tlc"
%include "extmodetypeslib.tlc"
%with ::CompiledModel
%switch CodeFormat
%case "RealTime"
%case "Embedded-C"
%include "formatwide.tlc"
%if UsingMalloc
%assign mapfile = "mrtmap"
%else
%assign mapfile = "formatmap"
%endif
%break
%case "S-Function"
%include "formatwide.tlc"
%break
%default
%assign errTxt = "Unknown CodeFormat: %<CodeFormat>"
%<LibReportFatalError(errTxt)>
%endswitch
%if CreateTransitionTable == 1
%assign ::CompiledModel.GenerateInterfaceAPI = 1
%endif
%if GenerateInterfaceAPI
%<SLibMapData()>
%endif
%if InterfaceAPIGenerated || CustomInterfaceAPIGenerated
%if CreateTransitionTable == 1
%<SLibWriteExtModeHostMapFile()>
%include "%<mapfile>.tlc"
%endif
%<SLibPostMapData()>
%endif
%if CreateExtModeTaskInfo == 1
%<SLibWriteExtModeTaskInfoFile()>
%endif
%if CreateExtModeTypes == 1
%<SLibWriteExtModeTypesFile()>
%endif
%if 1 == ::GenerateMDX
%include "mdxlib.tlc"
%<SLibMDXCommonEntry()>
%endif
%if SLibAutosarActive()
%<SLibWriteRTEParamInitValues()>
%endif
%if ::GenerateASAP2 == 1
%include "asap2main.tlc"
%endif
%<SLibSetSystemMap()>
%include "report.tlc"
%assert ISEMPTY(GetCurrentUtilsIncludesIdx())
%assert SIZE(::GlobalSharedUtilsIncludes,1) == 0
%endwith
%endif