User`s guide
3 Code Generation and the Build Process
3-26
Typically, build options are specified as a comment at the top of the template
makefile you are using.
You need to configure your template makefile if the options that can be passed
to
make do not provide you with enough flexibility. The Real-Time Workshop
uses
make since it is a very flexible tool. It lets you control nearly every aspect
of building the generated code and run-time interface modules into your
real-time program.
Make Utilities
To configure your template makefile, you need to understand how make works
and how
make processes makefiles. There are several good books on make.
Consult your local bookstore or refer to the documentation provided with the
make utility you are using.
There are several different versions of
make available. Perhaps the most
flexible and powerful
make utility is GNU Make, which is provided by the Free
Software Foundation. We provide GNU Make for both UNIX and PC platforms;
it can be found in:
matlabroot/rtw/bin/arch
It is possible to use other versions of make with the Real-Time Workshop, but
they do not have as rich a set of features. To work with the Real-Time
Workshop, any version of
make must allow this command format:
makecommand −f model.mk
Structure of the Template Makefiles
Before configuring or creating a Real-Time Workshop template makefile, you
should become familiar with its structure. A template makefile has four
sections:
• The first section contains an initial comment section that describes what this
makefile targets.
• The second section defines macros that tell
make_rtw how to process the
template makefile. The macros are
MAKE — This is the command used to invoke the make utility. For example, if
MAKE = mymake