Name

mk_library — Build a library

Synopsis

MODULES="... compiler ..."

mk_library LIB=name options...

Options

LIB=name

Sets the name of the library. Do not specify a leading lib or file extension.

VERSION=verspec

Sets the version information on the created library. There are several possible formats for verspec:

cur:rev:age[-release]

This defines the version using the libtool version information convention, which is the preferred method. cur is the current version of the interface, rev is the current revision of the implementation, and age is how many interface versions into the past with which you remain compatible. If you specify release, it will be suffixed to the name of the physical library prior to any extensions.

major.minor.micro

This defines the version in terms of the literal major, minor, and micro numbers that appear in the library name. Note that not all three numbers are used on every platform; on these, the unused numbers are omitted.

ver1,ver2,...

This explicitly defines the versions numbers that will appear in the filenames of the physical library and its symbolic links. ver1 is for the binary itself, and all subsequent versions will be symlinks. If you specify - as a version, it will create a file or link with no version suffixes (e.g. libfoo.so).

SYMFILE=file

Specifies a file which contains a list of symbol names, one per line, which should be exported by the library. If this is option is not used, it defaults to the behavior of the compiler and linker, which typically export all non-static symbols. This option will be silently ignored on platforms where it is not supported.

...

Other common options documented in the compiler module.

Description

Defines a target to build a C/C++ shared library.

A libtool-compatible .la file will also be generated. This is actually the canonical representation of a library in MakeKit and is the target which is placed in result.