addAdditionalSourceFile - Add source file to array of source files for code replacement table
entry - MATLAB ([original](https://www.mathworks.com/help/ecoder/ref/addadditionalsourcefile.html)) ([raw](?raw))
Main Content
Add source file to array of source files for code replacement table entry
Syntax
Description
addAdditionalSourceFile([hEntry](#d126e812),[sourceFile](#d126e843))
adds a specified additional source file to the array of additional source files for a code replacement table entry.
This function adds -I
to the compile line in the generated makefile.
Examples
This example shows how to use theaddAdditionalSourceFile
function withaddAdditionalHeaderFile
,addAdditionalIncludePath
, andaddAdditionalSourcePath
to specify additional header and source files fully for a code replacement table entry.
% Path to external header and source files libdir = fullfile('$(MATLAB_ROOT)','..', '..', 'lib');
op_entry = RTW.TflCOperationEntry; . . . addAdditionalHeaderFile(op_entry, 'all_additions.h'); addAdditionalIncludePath(op_entry, fullfile(libdir, 'include'));
addAdditionalSourceFile(op_entry, 'all_additions.c'); addAdditionalSourcePath(op_entry, fullfile(libdir, 'src'));
Input Arguments
The hEntry
is a handle to a code replacement table entry previously returned by instantiating a code replacement table entry class, such as _`hEntry`_ = RTW.TflCFunctionEntry
or_`hEntry`_ = RTW.TflCOperationEntry
.
Example: op_entry
The sourceFile
is a character vector or string scalar specifying an additional source file.
Example: 'all_additions.c'
Version History
Introduced in R2007b