User`s guide

mcc
7-32
Understanding a Macro Option. Th e -m option t ells the Compiler to produce a
stand-alone C application. The
-m macro is equiv alent t o the series of options
-t -W main -L C -T link:exe -h libmmfile.mlib
This table shows the five options that compose the -m macro and the
information that they provide to the Compiler.
Changing Macro Options. You can change the meaning of a macro option by
editing the corresponding
macro_option file bundle file in <matlab>/toolbox/
compiler/bundles
. For example, to change the -x macro, edit the file
macro_option_x in the bundles directory.
Setting Up Default Options
If you have some command line options that you wish always to pass to mcc,
you can do so by setting up an
mccstartup file. Create a text file containing the
desired command line options and name the file
mccstartup.Placethisfilein
one of two directories:
1 The current working directory, or
2 Your preferences directory ($HOME/.matlab/R12 on UNIX,
<system root>\profiles\<user>\application data\mathworks\matlab\R12
on PC)
Table 7-2: The -m Macro
Option Function
-t
Translate M co de to C/C++ code.
-W main
Produce a wrapper file suitable for a stand-alone
application.
-L C
Generate C code as the target l anguage.
-T link:exe
Create an executable as the output.
-h
Automatically, find and compile helper functions
included in the source M-file.
libmmfile.mlib
Link to this shared library whenever necessary.