| MATLAB Compiler | ![]() |
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.
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
foo_main.c). For libraries and components, this file includes all of the generated interface functions.
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.
| Overview of the MATLAB Compiler Technology | Input and Output Files | ![]() |
© 1994-2005 The MathWorks, Inc.