MATLAB Compiler Previous page   Next Page

Build Process

The process of creating software components with the MATLAB Compiler are completely automatic. For example, to create a stand-alone MATLAB application, you supply the list of M-files that make up the application. The Compiler then performs the following operations:

This figure illustrates how the Compiler takes user code and generates a stand-alone executable.

Flowchart showing the processing of two user files (foo.m and bar.m) into executable programs (foo.ctf and foo.exe).

Dependency Analysis

The first step determines all the functions on which the supplied M-files, MEX-files, and P-files depend. This list includes all the M-files called by the given files as well as files that they call, and so on. Also included are all built-in functions and MATLAB objects.

Wrapper Code Generation

This step generates all the source code needed to create the target component, including

Archive Creation

The list of MATLAB executable files (M-files and MEX-files) created during dependency analysis is used to create a CTF archive that contains the files needed by the component to properly execute at run-time. The files are encrypted and compressed into a single file for deployment. Directory information is also included so that the content is properly installed on the target machine.

C/C++ Compilation

This step compiles the generated C/C++ files from wrapper code generation into object code. For targets that support the inclusion of user-supplied C/C++ code on the mcc command line, this code is also compiled at this stage.

Linking

The final step links the generated object files with the necessary MATLAB libraries to create the finished component.

The C/C++ compilation and linking steps use the mbuild utility that is included with the MATLAB Compiler.


Previous page  Overview of the MATLAB Compiler Technology Input and Output Files Next page

© 1994-2005 The MathWorks, Inc.