function [buildResult, mainObjFolder] = make_rtw(buildArgs, varargin)
% MAKE_RTW Executes the Simulink Coder Build procedure for a block diagram.
%
%       MAKE_RTW first invokes the Target Language Compiler to generate the
%       code and then invokes the language specific make procedure. 
%
%       Calls rtw_<target_language>, tlc_<target_language>
%
%       This is an internal use only function and should not be called directly.

%       Copyright 1994-2019 The MathWorks, Inc.

validateattributes(buildArgs, {'coder.build.internal.BuildArgs'}, {'scalar'}, mfilename, 'buildArgs');

%  instantiate an object of coder.internal.ModelCodegenMgr class
h = coder.internal.ModelCodegenMgr;

%  call make_rtw method of coder.internal.ModelCodegenMgr class
%  Note: varargin must be kept untouched.
[buildResult, mainObjFolder] = h.make_rtw(buildArgs, varargin{:});
