numam-spdk/mk
Jim Harris 79f9a7f572 build: generate pkg-config files for SPDK
Users can now generate the necessary linker args for their
own applications using something like:

PKG_CONFIG_PATH=build/lib/pkgconfig pkg-config --libs spdk_nvme

Dependencies between libraries are included in the generated
.pc files, so the user only needs to pass the top-level subsystems
or individual SPDK libraries they are using in their application.

Modules will automatically be added to the output if the associated
library is specified.  For example, specifying "spdk_bdev" will include
the libraries not only for spdk_bdev, but also all of the bdev modules.

Users still need to supply the -Wl,--no-as-needed or -Wl,--whole-archive
flags. They cannot be added to the .pc files without increasing the length
of the argument string by a factor of 15x to 20x.

Modify the test/external_code/hello_world Makefile to use pkg-config to
ensure this gets tested at some level in our autotest environment.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie48a75f11969d5d775d514cf10bcb82d197eabfd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4371
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 09:46:32 +00:00
..
nvme.libtest.mk build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
spdk_blank.map mk: add a placeholder map file. 2020-05-14 10:37:14 +00:00
spdk.app_cxx.mk build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
spdk.app_vars.mk build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
spdk.app.mk build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
spdk.common.mk build: generate pkg-config files for SPDK 2021-01-21 09:46:32 +00:00
spdk.deps.mk build: add copyright header where missing 2016-11-22 16:41:47 -07:00
spdk.fio.mk build: Place fio plugins into build/fio 2020-06-15 15:27:16 +00:00
spdk.lib_deps.mk NVMe/vfio-user: add initial version vfio-user transport to NVMe driver 2021-01-21 05:00:18 +00:00
spdk.lib.mk build: generate pkg-config files for SPDK 2021-01-21 09:46:32 +00:00
spdk.mock.unittest.mk test: Add mocks for sendmsg and recvmsg 2019-11-01 17:56:16 +00:00
spdk.modules.mk NVMe/vfio-user: add initial version vfio-user transport to NVMe driver 2021-01-21 05:00:18 +00:00
spdk.nvmecli.mk vhost: deprecate internal vhost library support 2020-10-20 02:42:16 +00:00
spdk.subdirs.mk Makefile: Add possibility to uninstall spdk. 2019-05-16 20:56:18 +00:00
spdk.unittest.mk make/unittest: don't link against shared env lib. 2020-04-22 09:21:55 +00:00