Main Content

Template makefile


Specify the template makefile from which to generate the makefile.


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: grt_default_tmf

The template makefile determines which compiler runs, during the make phase of the build, to compile the generated code. You can specify template makefiles in the following ways:

  • Generate a value by selecting a target configuration using the System Target File Browser.

  • Explicitly enter a custom template makefile filename (including the extension). The file must be on the MATLAB® path.


  • If you do not include a filename extension for a custom template makefile, the code generator attempts to find and execute a MATLAB language file.

  • You can customize your build process by modifying an existing template makefile or by providing your own template makefile.


This parameter is enabled by Generate makefile.

Command-Line Information

Parameter: TemplateMakefile
Type: character vector
Value: valid template makefile filename
Default: 'grt_default_tmf'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics