Research Computing has developed a standalone utility package to make standalone generation, and especially subsequent updating, more convenient (See Download Standalone Example):
-
make.m
creates standalone with application-specific settings defined inmakefile.m
. -
makefile.m
is a template with which application-specific parameters are set by user, such as the application’s directory path and file names (all of which in a single folder), toolboxes needed, and MATLAB runtime behaviors.
makefile.m
While the default is to include all toolboxes, selecting only the ones your application needs can speed up compilation significantly (
mcc -p
option).
If you are not sure which toolboxes your application needs,
inmem
can identify program dependencies.
For running in batch exclusively, compile with -R runtime options (see
make.m
).
>> make dryrun % just a test. Shows what make would do
make will perform this task . . .
mcc -mv -o myExecR2014b myStandalone ...
-N -p distcomp ...
-R -singleCompThread -R -nodisplay ...
-R '-startmsg,Program authored by RESEARCHER' ...
-a codes2compile
******************************************************
This is a test. No standalone generated.
******************************************************
>> make % create/update executable whenever an m-file is modified
make will perform this task . . .
mcc -mv -o myExecR2014b myStandalone ...
-N -p distcomp ...
-R -singleCompThread -R -nodisplay ...
-R '-startmsg,Program authored by RESEARCHER' ...
-a codes2compile
Starts compiling . . .
Compiler version: 5.2 (R2014b)
Dependency analysis by REQUIREMENTS.
. . . . .
. . . . .
. . . . .
Removing: '/tmp/0c9ffTaZTeK_51711.auth'.
Removing: '/tmp/0c9ffvRmxWj_51711.auth'.
Removing: '/tmp/0c9ff7OjjFI_51711.auth'.
Generating file "/project/scv/kadin/matlab/compiler/test/readme.txt".
Generating file "run_myExecR2014b.sh".
******************************************************
Compile time for myExecR2014b is 111.57 seconds
******************************************************