User`s guide
Template Makefiles
3-25
In addition target specific tokens defined via the Real-Time Workshop page of
the
Simulation Parameters dialog box are expanded. In the RTW Options
section of the system target file, any structures in the rtwoptions array that
contain the field
makevariable will be expanded. For example, in matlabroot/
rtw/c/grt/grt.tlc,
you will see a Target Language Compiler comment
containing M-file code that sets up
rtwoptions.Insidegrt.tlc,the
rtwoptions(2).makevariable = 'EXT_MODE'
directive causes the |>EXT_MODE<| token to be expanded into 1 (on) or 0 (off).
After creating
model.mk from your template makefile, the Real-Time Workshop
invokes a
make command. Make is a utility designed to create an executable
from a set of source files. To invoke
make, the Real-Time Workshop issues this
command:
makecommand −f model.mk
makecommand
is defined by the MAKE macro in your systems template makefile
(see Figure 3-7 on page 3-29). You can specify additional options to
make as
described in the “Make Command” on page 3-11. For example, specifying
OPT_OPTS=-O2 to make_rtw generates the following make command:
makecommand −f model.mk OPT_OPTS=−O2
|>TID01EQ<|
Either 1 or 0: Are the sampling rates of
the continuous task and the first
discrete task equal?
|>NCSTATES<| Number of continuous states.
|>BUILDARGS<| Options passed to make_rtw. This
token is provided so that the contents of
your
model.mk file will change when
you change the build arguments, thus
forcing an update of all modules when
your build options change.
Table 3-4: Template Makefile Tokens Expanded by make_rtw (Continued)
Token Expansion