"libnm-core/" is rather complicated. It provides a static library that
is linked into libnm.so and NetworkManager. It also contains public
headers (like "nm-setting.h") which are part of public libnm API.
Then we have helper libraries ("libnm-core/nm-libnm-core-*/") which
only rely on public API of libnm-core, but are themself static
libraries that can be used by anybody who uses libnm-core. And
"libnm-core/nm-libnm-core-intern" is used by libnm-core itself.
Move "libnm-core/" to "src/". But also split it in different
directories so that they have a clearer purpose.
The goal is to have a flat directory hierarchy. The "src/libnm-core*/"
directories correspond to the different modules (static libraries and set
of headers that we have). We have different kinds of such modules because
of how we combine various code together. The directory layout now reflects
this.
1.1 KiB
libnm-core-public
This contains (mostly) header files only, which are also part of
the public API of libnm.
Also, this API is implemented by the static library libnm-core-impl,
which in turn is statically linked into NetworkManager core and libnm.
These headers can be used by anybody who either:
- links (statically) against
libnm-core-impl. - links dynamically against
libnm.
Note that there is also one source file: nm-core-enum-types.c.
This source file really belongs to libnm-core-impl but it is here
because it's a generated file and so far I couldn't figure out how
to generate nm-core-enum-types.h here while moving nm-core-enum-types.c
to libnm-core-impl.
Aside nm-core-enum-types.c, this directory only provides header files.
Users should add this directory (both srcdir and builddir) to the include
search path, because libnm users are used to include these headers unqualified
(like #include "nm-setting.h).