Main Content

Generate makefile

Enable generation of makefile to use for compiling generated code

Model Configuration Pane: Code Generation


The Generate makefile parameter enables generation of a makefile based on a specified template makefile. The build process uses the generated make file to compile the generated code.


This parameter appears when the model is configured with a system target file that specifies template makefile-based code generation, as described in Configure Toolchain (ToolchainInfo) or Template Makefile Build Process.


This parameter enables:

  • Make command

  • Template makefile


on (default) | off

Generates a makefile for a model during the build process.


Suppresses the generation of a makefile. You must set up post code generation build processing, including compilation and linking, as a user-defined command.

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: GenerateMakefile
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2007a