diff --git a/test/external_code/Makefile b/test/external_code/Makefile index 4a4fb6251..6da3f62fc 100644 --- a/test/external_code/Makefile +++ b/test/external_code/Makefile @@ -44,6 +44,10 @@ endif ifneq ($(DPDK_LIB_DIR),) COMMON_CFLAGS+=-L$(DPDK_LIB_DIR) endif + +ifneq ($(VFIO_LIB_DIR),) +COMMON_CFLAGS+=-L$(VFIO_LIB_DIR) +endif export .PHONY: all diff --git a/test/external_code/test_make.sh b/test/external_code/test_make.sh index 84cbef690..d98cac346 100755 --- a/test/external_code/test_make.sh +++ b/test/external_code/test_make.sh @@ -22,7 +22,8 @@ make -C $SPDK_DIR -j$(nproc) export SPDK_HEADER_DIR="$SPDK_DIR/include" export SPDK_LIB_DIR="$SPDK_DIR/build/lib" export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$SPDK_DIR/dpdk/build}/lib" -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru" +export VFIO_LIB_DIR="$SPDK_DIR/libvfio-user/build/release/lib" +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:$VFIO_LIB_DIR:"$test_root/passthru" # The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so. run_test "external_make_tc1" make -C $test_root hello_world_bdev_shared_combo