SLAU132Y September 2004 – June 2021
Run the following command to see the full list of options. These are described in Table 8-2.
mklib --help
Option | Effect |
---|---|
--index=filename | The index library (libc.a) for this release. Used to find a template library for custom builds, and to find the source files (in the lib/src subdirectory of the compiler installation). REQUIRED. |
--pattern=filename | Pattern for building a library. If neither --extra_options nor --options are specified, the library will be the standard library with the standard options for that library. If either --extra_options or --options are specified, the library is a custom library with custom options. REQUIRED unless --all is used. |
--all | Build all standard libraries at once. |
--install_to=directory | The directory into which to write the library. For a standard library, this defaults to the same directory as the index library (libc.a). For a custom library, this option is REQUIRED. |
--compiler_bin_dir= directory |
The directory where the compiler executables are. When invoking mklib directly, the executables should be in the path, but if they are not, this option must be used to tell mklib where they are. This option is primarily for use when mklib is invoked by the linker. |
--name=filename | File name for the library with no directory part. Only useful for custom libraries. |
--options='str' | Options to use when building the library. The default options (see below) are replaced by this string. If this option is used, the library will be a custom library. |
--extra_options='str' | Options to use when building the library. The default options (see below) are also used. If this option is used, the library will be a custom library. |
--list_libraries | List the libraries this script is capable of building and exit. ordinary system-specific directory. |
--log=filename | Save the build log as filename. |
--tmpdir=directory | Use directory for scratch space instead of the ordinary system-specific directory. |
--gmake=filename | Gmake-compatible program to invoke instead of "gmake" |
--parallel=N | Compile N files at once ("gmake -j N"). |
--query=filename | Does this script know how to build FILENAME? |
--help or --h | Display this help. |
--quiet or --q | Operate silently. |
--verbose or --v | Extra information to debug this executable. |
Examples:
To build all standard libraries and place them in the compiler's library directory:
mklib --all --index=$C_DIR/lib
To build one standard library and place it in the compiler's library directory:
mklib --pattern=rts430_eabi.lib --index=$C_DIR/lib
To build a custom library that is just like rts430_eabi.lib, but has symbolic debugging support enabled:
mklib --pattern=rts430_eabi.lib --extra_options="-g" --index=$C_DIR/lib --install_to=$Project/Debug --name=rts430_debug.lib