User`s guide

3 Code Generation and the Build Process
3-32
Generic Real-Time Templates
The Real-Time Workshop includes a set of built-in template makefiles that are
set up for generic real-time code generation. These template makefiles allow
you to simulate your fixed-step models on your workstation. This section
discusses these template makefiles:
grt_unix.tmf — targets UNIX platforms using any ANSI C compiler (cc is
the default on all platforms except SunOS, where
gcc is the default).
grt_vc.tmf — creates a generic real-time executable for Windows 95,
Windows 98, or Windows NT using Microsoft Visual C/C++.
grt_msvc.tmf — creates a generic real-time project makefile for Windows
95, Windows 98, or Windows NT for use with Microsoft Visual C/C++.
grt_watc.tmf — creates a generic real-time executable for Windows 95,
Windows 98, or Windows NT using the Watcom C/C++ compiler.
grt_bc.tmf — creates a generic real-time executable for Windows 95,
Windows 98, or Windows NT using the Borland C/C++ compiler.
If you set the template makefile to
grt_default_tmf, then the Real-Time
Workshop will use the correct makefile for your system. For example, it will use
grt_vc.tmf if you have your PC configured for Visual C/C++. The exception to
this is when you want to create a real-time project makefile for Windows. In
that case, you must select
grt_msvc.tmf instead of grt_default_tmf.
grt_unix.tmf
The generic real-time template makefile for UNIX platforms is designed to be
used with GNU Make. This makefile is set up to conform to the guidelines
specified in the IEEE Std 1003.2-1992 (POSIX) standard.
You can supply the following options to
grt_unix.tmf via arguments to the
make command, make_rtw:
OPTS — User-specific options, for example:
make_rtw OPTS="DMYDEFINE=1"
OPT_OPTS — Optimization options. The default optimization option is O.To
turn off optimization and add debugging symbols, specify the
g compiler
switch in the
make command:
make_rtw OPT_OPTS="g"