User`s guide
2 Building an Application
2-18
Note Real-Time Workshop executes all user-written S-function target files,
but optionally executes block target files for Simulink blocks.
4 Writes a source code version of the Simulink block diagram.
Customized Makefile Generation
After generating the code, Real-Time Workshop generates a customized
makefile,
model.mk. The generated makefile instructs the make system utility
to compile and link source code generated from the model, as well as any
required harness program, libraries, or user-provided modules.
Real-Time Workshop creates
model.mk from a system template makefile,
system.tmf (where system stands for the selected target name). The system
template makefile is designed for your target environment. You have the
option of modifying the template makefile to specify compilers, compiler
options, and additional information used during the creation of the
executable.
Real-Time Workshop creates the
model.mk file by copying the contents of
system.tmf and expanding lexical tokens (symbolic names) that describe
your model’s configuration.
Real-Time Workshop provides many system template makefiles, configured
for specific target environments and development systems. “The System
Target File Browser” in the Real-Time Workshop User’s Guide
documentation lists all template makefiles that are bundled with Real-Time
Workshop.
You can fully customize your build process by modifying an existing template
makefile or providing your own template makefile.
Executable Program Generation
The following figure shows how Real-Time Workshop controls automatic
program building: