function [lNeedSolverSources, lModelRefString] = ...
rtw_c...
(modelName, lBuildInfo, ...
lConfigSet, ...
lDynMemAlloc4CPPEncap, ...
lIsProtectingModel, ...
lExtMode, ...
masterAnchorFolder,...
varargin)
% RTW_C updates buildInfo following code generation

% Copyright 1994-2020 The MathWorks, Inc.

% As performance optimization, use a persistent variable for the input parser
persistent p
if isempty(p)
p = inputParser;

addParameter(p, 'ModelReferenceTargetType', '', @ischar)
addParameter(p, 'IsSimulinkAccelerator', false, @islogical);
addParameter(p, 'RapidAcceleratorIsActive', false, @islogical);
addParameter(p, 'InfoStructLinkLibraries', {}, @iscell);
addParameter(p, 'InfoStructRelativePathToAnchor', '', @ischar);
addParameter(p, 'InfoStructLinkLibrariesFullPaths', {}, @iscell);
addParameter(p, 'InfoStructIncludePaths', {}, @iscell);
addParameter(p, 'InfoStructProtectedModelRefs', {}, @iscell);
addParameter(p, 'InfoStructContainsNonInlinedSFcn', false, @islogical);
addParameter(p, 'InfoStructModelRefsAll', {}, @iscell);
addParameter(p, 'InfoStructDirectMdlRefs', {}, @iscell);
addParameter(p, 'InfoStructModelRefBuildDirs', {}, @iscell);
addParameter(p, 'InfoStructProtectedModelRefBuildDirs', {}, @iscell);
addParameter(p, 'InfoStructModelIncludeDirs', {}, @iscell);
addParameter(p, 'InfoStructModelSourceDirs', {}, @iscell);
addParameter(p, 'SubModelPreCompLibs', {}, @iscell);
addParameter(p, 'SubModelPreCompLibLocations', {}, @iscell);
addParameter(p, 'SubModelPreCompModules', {}, @iscell);
addParameter(p, 'Solver', '', @ischar);
addParameter(p, 'Tid01Eq', '', @ischar);
addParameter(p, 'GenRTModel', '', @ischar);
addParameter(p, 'ModelReferenceInfo', '', @iscell);
addParameter(p, 'CodeFormat', '', @ischar);
addParameter(p, 'ClassicInterface', '');
addParameter(p, 'RSIMWithSlSolver', false);
addParameter(p, 'AllocFcn', '');
addParameter(p, 'NonInlinedSFunctions', '', @iscell);
addParameter(p, 'TargetLangStdTfl', 'ANSI_C', @ischar);
addParameter(p, 'UsesNonAnsiTrigFcn', false, @islogical);
end

parse(p, varargin{:});

istrLinkLibraries = p.Results.InfoStructLinkLibraries;
istrLinkLibrariesFullPaths = p.Results.InfoStructLinkLibrariesFullPaths;
istrProtectedModelRefs = p.Results.InfoStructProtectedModelRefs;
istrContainsNonInlinedSFcn = p.Results.InfoStructContainsNonInlinedSFcn;
istrInfoStructModelRefsAll = p.Results.InfoStructModelRefsAll;
istrInfoStructDirectMdlRefs = p.Results.InfoStructDirectMdlRefs;
istrInfoStructModelRefBuildDirs = p.Results.InfoStructModelRefBuildDirs;
istrInfoStructProtectedModelRefBuildDirs = p.Results.InfoStructProtectedModelRefBuildDirs;
istrIncludeDirs = p.Results.InfoStructModelIncludeDirs;
istrSourceDirs = p.Results.InfoStructModelSourceDirs;
lModelReferenceTargetType = p.Results.ModelReferenceTargetType;
lIsSimulinkAccelerator = p.Results.IsSimulinkAccelerator;
lRapidAcceleratorIsActive = p.Results.RapidAcceleratorIsActive;
rtwSolver = p.Results.Solver;
rtwTid01eq = p.Results.Tid01Eq;
rtwGenRTModel = p.Results.GenRTModel;
modelrefInfo = p.Results.ModelReferenceInfo;
lCodeFormat = p.Results.CodeFormat;
lNonInlinedSFunctions = p.Results.NonInlinedSFunctions;
lUsesNonAnsiTrigFcn = p.Results.UsesNonAnsiTrigFcn;

% Existing sub-model pre-compiled libraries
lSubModelPreCompLibs = p.Results.SubModelPreCompLibs;
lSubModelPreCompLibLoc = p.Results.SubModelPreCompLibLocations;
lSubModelPreCompModules = p.Results.SubModelPreCompModules;

%-----------------------------------------------------------------------
% The Model may have specified the PrecompLibLocation and suffix, get them
% here.
lBuildInfo.TargetPreCompLibLoc = get_param(lConfigSet,...
'TargetPreCompLibLocation');

lSystemTargetFile = strtrim(get_param(lConfigSet, 'SystemTargetFile'));

% Add build args including 'NON_ANSI_TRIG_FCN', 'SINGLE_LINE_COMMENTS' to
% buildInfo
groupBuildArg = coder.make.internal.BuildInfoGroup.BuildArgGroup;
addRequiredBuildArgs(lBuildInfo, lConfigSet, groupBuildArg, lUsesNonAnsiTrigFcn);

% Determine if solver source files are required
lNeedSolverSources = locNeedSolverSources...
(lSystemTargetFile, p.Results.RSIMWithSlSolver);

% Get any solver source file required by current target (rsim, raccel, rtwsfcn)
solverSourceFile = locGetSolverSourceFile...
(rtwGenRTModel, rtwSolver, lCodeFormat, lNeedSolverSources);
if ~isempty(solverSourceFile)
addSourceFiles(lBuildInfo, solverSourceFile, '', 'SOLVER');
end

if strcmp(lModelReferenceTargetType, 'SIM')
lBuildInfo.addDefines('-DMATLAB_MEX_FILE','OPTS');
end

% External mode tests should use the external mode test harness.
if strcmp(lExtMode, 'on') && ...
~any(strcmp(lSystemTargetFile, {'sldrt.tlc', 'sldrtert.tlc', 'rtwin.tlc', 'rtwinert.tlc'})) && ...
~strcmp(lSystemTargetFile,'idelink_grt.tlc') && ...
~strcmp(lSystemTargetFile,'idelink_ert.tlc') && ...
~strcmp(lSystemTargetFile,'realtime.tlc') && ...
~strcmp('on', get_param(lConfigSet,'OnTargetOneClick')) &&...
~lRapidAcceleratorIsActive && ...
((exist('qeInSbRunTests','file') && qeInSbRunTests) || ...
(exist('qeinbat','file') && qeinbat))
% qesimcheck (as of Nov-2018) provides a test harness which ensures the ext mode executable
% doesn't drool, etc. without requiring special code in the generated code model binary. See
% details in
% matlab/test/tools/qesimcheck/+qesimcheck/+mode/external_ext_comm.m
% where we add_param(model, 'qesimcheckExtModeTesting', 'on');
try
qesimcheckActive = get_param(modelName, 'qesimcheckExtModeTesting');
catch me
if isequal(me.identifier,'Simulink:Commands:ParamUnknown')
qesimcheckActive = 'off';
else
rethrow me
end
end
if ~isequal(qesimcheckActive,'on')
lBuildInfo.addDefines('-DTMW_EXTMODE_TESTING_REQ=1','OPTS');
end
end

% Build list of model reference blocks
if ~isempty(modelrefInfo)
modelrefCell{length(modelrefInfo)} = '';
for idx = 1:length(modelrefInfo)
fileName = modelrefInfo{idx}{2};
modelrefCell{idx} = fileName;
end
modelrefCellUnique = RTW.unique(modelrefCell);
lModelRefString = sprintf('%s ',modelrefCellUnique{:});
else
lModelRefString = '';
end

lBuildInfo.addDefines(['CLASSIC_INTERFACE=', p.Results.ClassicInterface],'Build Args');

lBuildInfo.addDefines(['ALLOCATIONFCN=', p.Results.AllocFcn],'Build Args');

grtInterface = 0;
if strcmp(lCodeFormat,'Embedded-C')
grtInterface = strcmp(get_param(lConfigSet,'GRTInterface'), 'on');
end

if strcmp(lCodeFormat,'Embedded-C')
if (grtInterface || ...
(~strcmp(lSystemTargetFile,'modelrefsim.tlc') && ...
(~isempty(lNonInlinedSFunctions) || istrContainsNonInlinedSFcn)))
%
% For ERT with non-inlined s-functions must #define {RT, USE_RTMODEL}
% for simstruc.h. Remove when rtwtypes.h has this line
opts = {'-DRT' '-DUSE_RTMODEL' '-DERT'};
lBuildInfo.addDefines(opts,'OPTS');
end
end

% See g917413, g2067996
lBuildInfo.addDefines(['-DTID01EQ=' rtwTid01eq], 'OPTS');

% ---------------------------------------------------- %
% Expand |>START_EXPAND_RULE<| ... |>EXPAND_DIR_NAME<| %
% /* make rule */ %
% |>END_EXPAND_RULE<| %
% ---------------------------------------------------- %

% Add custom code settings from configset
locAddCustomDefines(lBuildInfo, ...
lModelReferenceTargetType, ...
lIsSimulinkAccelerator, ...
lRapidAcceleratorIsActive, ...
lConfigSet);

% Add sub-model pre-compiled libraries to buildInfo
locAddSubModelPreCompLibs(lBuildInfo, lSubModelPreCompLibs, ...
lSubModelPreCompLibLoc, ...
lSubModelPreCompModules);

% Add model ref source dirs
if ~isempty(istrIncludeDirs)
lBuildInfo.addIncludePaths(istrIncludeDirs,'MDLREF');
end
if ~isempty(istrSourceDirs)
lBuildInfo.addSourcePaths(istrSourceDirs,'MDLREF');
end

% Add model reference link libraries to BuildInfo
if ~isempty(istrLinkLibraries)
notMdlRefSimOrAccel = ~(strcmpi(lModelReferenceTargetType,'SIM') ||...
strcmp(lCodeFormat,'Accelerator_S-Function'));

[combinedModelRefs, modelRefsBuildDirs] = coder.internal.getMdlRefBuildInfo...
(lModelReferenceTargetType, istrInfoStructModelRefsAll, ...
istrProtectedModelRefs, ...
lSystemTargetFile, ...
istrInfoStructModelRefBuildDirs, ...
istrInfoStructProtectedModelRefBuildDirs, ...
istrLinkLibraries);

locAddMdlRefLinkObjsToBuildInfo(modelName, ...
lBuildInfo, ...
lRapidAcceleratorIsActive, ...
lModelReferenceTargetType, ...
notMdlRefSimOrAccel, ...
istrLinkLibrariesFullPaths, ...
istrLinkLibraries, ...
modelRefsBuildDirs, ...
combinedModelRefs, ...
istrInfoStructDirectMdlRefs, ...
lIsProtectingModel, ...
lDynMemAlloc4CPPEncap,...
masterAnchorFolder);
end

%-----------------------------------------------------------------------------
% Local functions
%-----------------------------------------------------------------------------
function addRequiredBuildArgs(lBuildInfo, cs, groupBuildArg, lUsesNonAnsiTrigFcn)
% g1251383: Always pass 'NON_ANSI_TRIG_FCN' and 'SINGLE_LINE_COMMENTS' to
% buildInfo here. Later in getCodeGenMacrosPerBuildVariant.m, use these info
% for GCC to remove -ansi -pedantic compiler option for compatibility of
% asinh, aconsh, and atanh.
bArgs = {};
bArgVals = {};
bArgGroups = {};
if lUsesNonAnsiTrigFcn
bArgs{end+1} = 'NON_ANSI_TRIG_FCN';
bArgVals{end+1} = '1';
bArgGroups{end+1} = groupBuildArg;
end

if coder.internal.isSingleLineComments(cs)
bArgs{end+1} = 'SINGLE_LINE_COMMENTS';
bArgVals{end+1} = '1';
bArgGroups{end+1} = groupBuildArg;
end

% put the build args in the BuildInfo object as a build arg
lBuildInfo.addBuildArgs(bArgs, bArgVals, bArgGroups);

function solverSourceFile = locGetSolverSourceFile...
(lGenRTModel, lSolver, lCodeFormat, lNeedSolverSources)

solverSourceFile = '';

if any(strcmp(lSolver, {'FixedStepDiscrete', 'VariableStepDiscrete'}))
return;
end

if strcmp(lGenRTModel,'"0"') && ...
~strcmp(lCodeFormat, 'Accelerator_S-Function') && ...
lNeedSolverSources

solverSourceFile = [lSolver, '.c'];
end

function lNeedSolverSources = locNeedSolverSources...
(lSystemTargetFile, lRSIMWithSlSolver)

lNeedSolverSources = false;

if strcmp(lSystemTargetFile,'rsim.tlc')
lNeedSolverSources = ~lRSIMWithSlSolver;
elseif ~strcmp(lSystemTargetFile,'raccel.tlc') &&...
~strcmp(lSystemTargetFile,'rtwsfcn.tlc')
lNeedSolverSources = true;
end

%=============================================================================
% Function: locAddCustomDefines
%
% inputs:
% h
% cs
%
%
% returns:
%
%
%=============================================================================
function locAddCustomDefines(lBuildInfo, lModelReferenceTargetType, ...
lIsSimulinkAccelerator, ...
lRapidAcceleratorIsActive, ...
cs)

useSim = lIsSimulinkAccelerator ||...
lRapidAcceleratorIsActive ||...
strcmp(lModelReferenceTargetType,'SIM');

if useSim
simSettings = cs.getComponent('any', 'Simulation Target');
unformattedDefs = simSettings.SimUserDefines;

else
rtwSettings = cs.getComponent('any', 'Code Generation');
unformattedDefs = rtwSettings.CustomDefine;
end

% This regexp pattern must match space separated defines. Spaces are allowed in
% the value portion if it is quoted. Tokens may optionally be preceded by "-D".
% These are allowable define tokens within the string:
%
% FOO
% FOO=1
% FOO=
% FOO="val"
% FOO=""
% -DFOO
% -DFOO=1
% -DFOO=
% -DFOO="val"
% -DFOO=""

pat = '(-D)?((\w+=(("[^"]*")|([^" ]*)))|(\w+))';

defs = regexp(unformattedDefs,pat,'match');
lBuildInfo.addDefines(defs,'Custom');

return;
%End of Function locAddCustomDefines

function locAddMdlRefLinkObjsToBuildInfo(modelName, ...
lBuildInfo, lRapidAcceleratorIsActive, ...
lModelReferenceTargetType, addSources, ...
istrLinkLibrariesFullPaths, ...
istrLinkLibraries, ...
istrInfoStructModelRefBuildDirs, ...
istrInfoStructModelRefsAll, ...
istrInfoStructDirectMdlRefs, ...
lIsProtectingModel, ...
dynMemAlloc4CPPEncap,...
masterAnchorFolder)

sd = masterAnchorFolder;
fsep = lBuildInfo.Settings.FileSep;

newLibs = [];
lflagsValues = {};
lflagsGroups = {};

sfcnNamesToPush = {};
sfcnPathsToPush = {};

allMrSysLibs = [];

% Loop through all referenced models and retrieve required data from the
% corresponding buildInfo.mat; g1596433(load buildInfo for direct child
% models only).
for i=1:length(istrInfoStructModelRefsAll)

% Determine if the current model is a direct child
isDirectModelRef = any(strcmp(...
istrInfoStructModelRefsAll{i}, istrInfoStructDirectMdlRefs));

[mrLinkFlags, mrLib, sfcnNames, sfcnPaths, linkObjs, subModelRefs, ...
mrNonStandardSysLibs] ...
= ...
locGetModelRefBuildData...
(sd, istrInfoStructModelRefBuildDirs{i}, istrLinkLibrariesFullPaths{i}, istrLinkLibraries{i}, ...
lIsProtectingModel, addSources, dynMemAlloc4CPPEncap, isDirectModelRef, ...
lRapidAcceleratorIsActive, lModelReferenceTargetType, fsep);

if ~isempty(mrNonStandardSysLibs)
allMrSysLibs = [allMrSysLibs(:); mrNonStandardSysLibs(:)];
end

sfcnNamesToPush = [sfcnNamesToPush; sfcnNames]; %#ok<AGROW>
sfcnPathsToPush = [sfcnPathsToPush; sfcnPaths]; %#ok<AGROW>

% get any added link flags from the child buildInfo and make sure
% we copy over the associated groups as well
for lflagIdx = 1:length(mrLinkFlags)
lflag = mrLinkFlags(lflagIdx);
lflagsValues{end+1} = lflag.Value; %#ok<AGROW>
lflagsGroups{end+1} = lflag.Group; %#ok<AGROW>
end

% Check if any unaccounted model ref lib objects are in the current
% model ref BuildInfo (e.g., manually added to the MDLREF_LIB group
% through a makecfg file).
if numel(subModelRefs) == 0
submodelModelRefs = {};
elseif numel(subModelRefs) == 1
submodelModelRefs = {get(subModelRefs, 'Name')};
else
submodelModelRefs = get(subModelRefs, 'Name');
end

% Include any unaccounted model refs now, but delay anything in
% istrLinkLibraries until its legitimate turn to avoid causing
% issues with ordering.
[~, unaccountedModelRefIdx] = setdiff(submodelModelRefs, istrLinkLibraries(:), 'stable');
unaccountedModelRefs = subModelRefs(unaccountedModelRefIdx);

newLibs = [newLibs; mrLib; unaccountedModelRefs; linkObjs]; %#ok
end

% Add system libraries from child models
nSysLibs = length(allMrSysLibs);
if nSysLibs > 0
sysLibNames = cell(nSysLibs, 1);
sysLibGroups = cell(nSysLibs, 1);
sysLibPaths = cell(nSysLibs, 1);
for i=1:nSysLibs
sysLibNames{i} = allMrSysLibs(i).FileName;
sysLibGroups{i} = allMrSysLibs(i).Group;
sysLibPaths{i} = allMrSysLibs(i).Path;
end
[~, keepIdx] = unique(sysLibNames, 'stable');
sysLibNames = sysLibNames(keepIdx);
sysLibPaths = sysLibPaths(keepIdx);
sysLibGroups = sysLibGroups(keepIdx);
addSysLibs(lBuildInfo, sysLibNames, sysLibPaths, sysLibGroups);
end

% For rapid accelerator, push the Sfcn files to the top model's build
% info and make sure all the files exist
lBuildInfo.addSourceFiles(sfcnNamesToPush, sfcnPathsToPush, 'Sfcn');
[~, pushedSFcns] = cellfun(@fileparts, sfcnNamesToPush, 'UniformOutput', false);
coder.internal.lookForRapidAccelNonInlinedSFunctionFiles(lBuildInfo, modelName, unique(pushedSFcns));

lBuildInfo.addLinkObjects(newLibs);
% Remove duplicates and add the child link flags to the current model's
% link flags
[lflagsValues,lflagsIdx] = unique(lflagsValues, 'stable'); % preserve ordering
lflagsGroups = lflagsGroups(lflagsIdx);
lBuildInfo.addLinkFlags(lflagsValues, lflagsGroups);
%End of Function locAddMdlRefLinkObjsToBuildInfo

function [mrLinkFlags, mrLib, sfcnNames, sfcnPaths, linkObjs, subModelRefs, ...
mrNonStandardSysLibs] ...
= locGetModelRefBuildData...
(lStartDir, mrRelativeBuildDir, istrLinkLibraryFullPath, istrLinkLibrary, lIsProtectingModel, ...
addSources, dynMemAlloc4CPPEncap, isDirectModelRef, ...
lRapidAcceleratorIsActive, lModelReferenceTargetType, buildInfoFileSep)

mrBuildDir = fullfile(lStartDir, mrRelativeBuildDir);

sfcnNames = {};
sfcnPaths = {};

sdToken = '$(START_DIR)';
mdlRefPath = fileparts(istrLinkLibraryFullPath);
mdlRefPath = fullfile(sdToken, mdlRefPath);
mrLib = RTW.BuildInfoLinkObj(istrLinkLibrary, mdlRefPath,...
1000,'MDLREF_LIB');

% Load the referenced model buildInfo
bi = load(fullfile(mrBuildDir, 'buildInfo.mat'), 'buildInfo');
refBuildInfo = bi.buildInfo;

mrLinkFlags = refBuildInfo.Options.LinkFlags;

% Make sure the start folder is consistent with location where the
% buildInfo was loaded from
refBuildInfo.Settings.LocalAnchorDir = lStartDir;

% Update paths if we are creating a protected model (g1092924)
if lIsProtectingModel
refBuildInfo.updateFilePathsAndExtensions();
end

if addSources
% the file separators may be different
refBuildInfo.updateFileSeparator(buildInfoFileSep);
if ~dynMemAlloc4CPPEncap || isDirectModelRef
incPaths = refBuildInfo.getIncludePaths(false);
else
incPaths = {};
end
isRapidAccelBuild = lRapidAcceleratorIsActive && strcmp(lModelReferenceTargetType, 'NONE');
[sfcnNames, sfcnPaths] = locAddBuildArtifactsToLinkObj(mrLib, refBuildInfo, incPaths, isRapidAccelBuild);
end

% Exclude shared utilities library because parent model will create its own
% link object shared utilities
sharedUtilsLibGroup = 'SHARED_SRC_LIB';

% Get all link objects except for shared utilities
linkObjs = refBuildInfo.getLinkObjects('', sharedUtilsLibGroup);

% Identify sub-models of the current referenced model
subModelRefs = refBuildInfo.ModelRefs;

% Identify any non-standard system libraries
if coder.internal.hostSupportsGccLikeSysLibs
mrSysLibs = refBuildInfo.SysLib.Files;
nonStandardIdx = false(size(mrSysLibs));
for i=1:length(mrSysLibs)
if ~strcmp(mrSysLibs(i).Group, 'Standard')
nonStandardIdx(i) = true;
end
end
mrNonStandardSysLibs = mrSysLibs(nonStandardIdx);
else
mrNonStandardSysLibs = [];
end

%=============================================================================
% Function: locAddSubModelPreCompLibs
%=============================================================================
function locAddSubModelPreCompLibs(lBuildInfo, lSubModelPreCompLibs, ...
lSubModelPreCompLibLoc, ...
lSubModelPreCompModules)
% Details sub-model pre-compiled libraries may have been provided via infoStruct

if ~isempty(lSubModelPreCompLibs)

% now the new libs can be added.
for i=1:length(lSubModelPreCompLibs)
% the libs come from submodel, need to put before top model
plib = lBuildInfo.addLibraries(lSubModelPreCompLibs{i},...
lSubModelPreCompLibLoc{i},...
1000-50, true,...
false, lSubModelPreCompLibs{i});
% The lib may already be in the table, if so, the return value is
% empty. This usually always happens for rtwlib, but can
% happen for any sfcn lib.
if ~isempty(plib)
plib.addSourceFiles(lSubModelPreCompModules{i},'',lSubModelPreCompLibs{i});
end
end
end

function [sfcnNames, sfcnPaths] = locAddBuildArtifactsToLinkObj(linkObj, refBuildInfo, incPaths, isRapidAccelBuild)
sfcnNames = {};
sfcnPaths = {};

% get the root level file and include path info out of the child buildInfo
srcfNames = get(refBuildInfo.Src.Files,'FileName');
srcfPaths = get(refBuildInfo.Src.Files,'Path');
srcfGroups = get(refBuildInfo.Src.Files,'Group');
incfNames = get(refBuildInfo.Inc.Files,'FileName');
incfPaths = get(refBuildInfo.Inc.Files,'Path');
nbNames = get(refBuildInfo.Other.Files,'FileName');
nbPaths = get(refBuildInfo.Other.Files,'Path');

srcPaths = refBuildInfo.getSourcePaths(false,{},'BuildDir');
mrBuildDir = refBuildInfo.getSourcePaths(false,'BuildDir');

if ~isempty(srcfNames)

linkObj.addSourceFiles(srcfNames,srcfPaths,'MDLREF_LIB_SRC');

% If we are doing a top level rapid accelerator build and
% the rapid accelerator is using model reference SIM target
% code, then we need to push up files from the referenced
% models non-inlined S-Functions to the top model's
% buildInfo.
if isRapidAccelBuild
sfcnFilesIndices = strcmp(srcfGroups, 'Sfcn');
if(any(sfcnFilesIndices))
sfcnNames = srcfNames(sfcnFilesIndices);
sfcnPaths = srcfPaths(sfcnFilesIndices);
end
end
end

% Propagate the unresolved flags from the child buildInfo
% See g1923666
linkObj.Settings.HasUnresolvedPaths = refBuildInfo.Settings.HasUnresolvedPaths;
linkObj.Settings.HasUnresolvedExtensions = refBuildInfo.Settings.HasUnresolvedExtensions;

linkObj.addIncludeFiles(incfNames,incfPaths,'MDLREF_LIB_INC');
linkObj.addNonBuildFiles(nbNames,nbPaths,'MDLREF_LIB_NB');
linkObj.addSourcePaths(mrBuildDir,'BuildDir');
linkObj.addSourcePaths(srcPaths,'MDLREF_LIB_SRC');
linkObj.addIncludePaths(incPaths,'MDLREF_LIB_INC');

% LocalWords: qesimcheck