| Real-Time Workshop User's Guide | ![]() |
Compiler-Specific Template Makefiles
This section documents the available compiler-specific template makefiles and common options you can use with each.
Template Makefiles for UNIX
ert_unix.tmfgrt_malloc_unix.tmfgrt_unix.tmfrsim_unix.tmfrtwsfcn_unix.tmfThe template makefiles for UNIX platforms are designed to be used with GNU Make. These makefile are set up to conform to the guidelines specified in the IEEE Std 1003.2-1992 (POSIX) standard.
You can supply options via arguments to the make command.
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, for example,make_rtw OPT_OPTS="-g"
For additional options, see the comments at the head of each template makefile.
Template Makefiles for Visual C/C++
The Real-Time Workshop offers two sets of template makefiles designed for use with Visual C/C++.
To build an executable within the Real-Time Workshop build process, use one of the target_vc.tmf template makefiles:
ert_vc.tmfgrt_malloc_vc.tmfgrt_vc.tmfrsim_vc.tmfrtwsfcn_vc.tmfYou can supply options via arguments to the make command.
OPTS -- User-specific options, for example,make_rtw OPTS="-DMYDEFINE=1"
OPT_OPTS -- Optimization options. The default optimization option is -Ot. To turn off optimization and add debugging symbols, specify the -Zd compiler switch in the make command.make_rtw OPT_OPTS="-Zd"
For additional options, see the comments at the head of each template makefile.
To create a Visual C/C++ project makefile (model.mak) without building an executable, use one of the target_msvc.tmf template makefiles:
ert_msvc.tmfgrt_malloc_msvc.tmfgrt_msvc.tmfThese template makefiles are designed to be used with nmake, which is bundled with Visual C/C++.
You can supply the following options via arguments to the nmake command:
OPTS -- User-specific options, for example,make_rtw OPTS="/D MYDEFINE=1"
For additional options, see the comments at the head of each template makefile.
Template Makefiles for Watcom C/C++
drt_watc.tmfert_watc.tmfgrt_malloc_watc.tmfgrt_watc.tmfrsim_watc.tmfrtwsfcn_watc.tmfwin_watc.tmfThe Real-Time Workshop provides template makefiles to create an executable for Windows 95, Windows 98, and Windows NT using Watcom C/C++. These template makefiles are designed to be used with wmake, which is bundled with Watcom C/C++.
You can supply options via arguments to the make command. Note that the location of the quotes is different from the other compilers and make utilities discussed in this chapter:
OPTS -- User specific options, for example,make_rtw "OPTS=-DMYDEFINE=1"
OPT_OPTS -- Optimization options. The default optimization option is -oxat. To turn off optimization and add debugging symbols, specify the -d2 compiler switch in the make command, for example,make_rtw "OPT_OPTS=-d2"
For additional options, see the comments at the head of each template makefile.
Template Makefiles for Borland C/C++
ert_bc.tmfgrt_bc.tmfgrt_malloc_bc.tmfrsim_bc.tmfrtwsfcn_bc.tmfThe Real-Time Workshop provides template makefiles to create an executable for Windows 95, Windows 98, and Windows NT using Borland C/C++.
You can supply these options via arguments to the make command:
OPTS -- User-specific options, for example,make_rtw OPTS="-DMYDEFINE=1"
OPT_OPTS -- Optimization options. Default is none. To turn off optimization and add debugging symbols, specify the -v compiler switch in the make command.make_rtw OPT_OPTS="-v"
For additional options, see the comments at the head of each template makefile.
Template Makefiles for LCC
ert_lcc.tmfgrt_lcc.tmfgrt_malloc_lcc.tmfrsim_lcc.tmfrtwsfcn_lcc.tmfThe Real-Time Workshop provides template makefiles to create an executable for Windows 95, Windows 98, and Windows NT using LCC compiler Version 2.4 and GNU Make (gmake).
You can supply options via arguments to the make command:
OPTS -- User-specific options, for example,make_rtw OPTS="-DMYDEFINE=1"
OPT_OPTS -- Optimization options. Default is none. To enable debugging, specify -g4 in the make command:make_rtw OPT_OPTS="-g4"
For additional options, see the comments at the head of each template makefile.
| Template Makefiles and Make Options | Template Makefile Structure | ![]() |