User`s guide
3 Code Generation and the Build Process
3-36
• USER_OBJS — Additional object (.obj) files, which are to be created from user
sources, such as files needed by S-functions.For example, suppose you have
an S-function called
my_sfcn.c, which is built with sfcn_lib1.c,and
sfcn_lib2.c. (library routines for use with many S-functions). You can
build,
my_sfcn.c using:
mex my_sfcn.c sfcn_lib1.c sfcn_lib2.c
In this case, the make command for the Real-Time Workshop should be
specified as:
make_rtw "USER_OBJS=sfcn_lib1.obj sfcn_lib2.obj"
YoucanavoidusingUSER_OBJS by specifying
set_param('block','SFunctionModules','sfcn_lib1 sfcn_lib2)
See “Using S-Functions with the Real-Time Workshop” in Chapter 3 of
Writing S-Functions.
•
USER_PATH — The directory path to the source (.c) files, which are used to
create any
.obj files specified in USER_OBJS. Multiple paths must be
separatedwithasemicolon(e.g.,
USER_PATH="path1;path2"). For example,
suppose
sfcn_lib1.c exists in your local directory and sfcn_lib2.c exists
in
c:\appl\src. Then the make command would be specified as:
make_rtw "USER_OBJS=sfcn_lib1.obj sfcn_lib2.obj"
"USER_PATH=c:\appl\src"
• USER_INCLUDES — Additional include paths. For example, suppose you have
two include paths (
c:\appl\inc and c:\support\inc) that are required for
the
sfcn_lib1.c and sfcn_lib2.c files in the above example. The make
command would be specified as:
make_rtw "USER_OBJS=sfcn_lib1.obj sfcn_lib2.obj"
"USER_PATH=c:\appl\src"
"USER_INCLUDES= −Ic:\appl\inc −Ic:\support\inc"
grt_bc.tmf
The Real-Time Workshop provides a generic real-time template makefile
(
grt_bc.tmf) to create an executable for Windows 95, Windows 98, and
Windows NT using Borland C/C++.
You can supply these options to
grt_bc.tmf via arguments to the make
command, make_rtw: