summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/both-libraries.md
blob: 1632f63f412f8df92ab76d439855e4443be0d55b (plain)
1
2
3
4
5
6
7
8
9
## Building both shared and static libraries

A new function `both_libraries()` has been added to build both shared and static
libraries at the same time. Source files will be compiled only once and object
files will be reused to build both shared and static libraries, unless
`b_staticpic` user option or `pic` argument are set to false in which case
sources will be compiled twice.

The returned `buildtarget` object always represents the shared library.