The "external" module that we link against is essentially a copy of the passthru bdev module in the modules/bdev directory. But let's not use the same names for the externally visible functions from this "external" module, so that we don't get link errors if we happen to link in both modules into one application. This will help in a future patch where we use pkg-config files to generate the list of the bdev modules. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I835c7e7ee8902f6829657ec6a3cf40cd802a1357 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5674 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> |
||
---|---|---|
.. | ||
hello_world | ||
passthru | ||
Makefile | ||
README.md | ||
test_make.sh |
This directory is meant to demonstrate how to link an external application and bdev module to the SPDK libraries. The makefiles contain six examples of linking against spdk libraries. They cover linking an application both with and without a custom bdev. For each of these categories, they also demonstrate linking against the spdk combined shared library, individual shared libraries, and static libraries.
This directory also contains a convenient test script, test_make.sh, which automates making SPDK and testing all six of these linker options. It takes a single argument, the path to an SPDK repository and should be run as follows:
sudo ./test_make.sh /path/to/spdk
The application hello_bdev
is a symlink and bdev module passthru_external
have been copied from their namesakes
in the top level SPDK github repository and don't have any special
functionality.