Main Content

Make command


Specify a make command and optionally append makefile options.


This parameter only appears when the model is configured to use a template makefile-based code generation target, as described in Configure Toolchain or Template Makefile Build Process.

Category: Code Generation


Default: make_rtw

An internal MATLAB® command used by code generation software to control the build process. The specified make command is invoked when you start a build.

  • Each target has an associated make command, automatically supplied when you select a target file using the System Target File Browser.

  • Some third-party targets supply a make command. See the vendor's documentation.

  • You can supply makefile options in the Make command field. The options are passed to the command-line invocation of the make utility, which adds them to the overall flags passed to the compiler. Append the options after the make command, as in the following example:

    make_rtw OPTS="-DMYDEFINE=1"

    The syntax for makefile options differs slightly for different compilers.


  • Most targets use the default command.

  • You should not invoke make_rtw or other internal make commands directly from MATLAB code. To initiate a model build from MATLAB code, use documented build commands such as slbuild or slbuild.


This parameter is enabled by Generate makefile.

Command-Line Information

Parameter: MakeCommand
Type: character vector
Value: valid make command MATLAB language file
Default: 'make_rtw'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo recommendation

Related Topics