mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
Makefile: let spdk/dpdk libraries linked in upper layer
Signed-off-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
parent
f911e2bf94
commit
5aa1c86f96
@ -727,14 +727,14 @@ fi
|
||||
AC_ARG_WITH(spdk,
|
||||
[AC_HELP_STRING([--with-spdk], [build Ceph SPDK Support])], [], [with_spdk=no])
|
||||
|
||||
AM_CONDITIONAL(HAVE_SPDK, [test "x$with_spdk" != "xno"])
|
||||
AM_CONDITIONAL(WITH_SPDK, [test "x$with_spdk" != "xno"])
|
||||
|
||||
if test "x$with_spdk" != x"no"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$with_spdk/include"
|
||||
AC_CHECK_HEADER([spdk/nvme.h], [], AC_MSG_ERROR([Cannot find header 'spdk/nvme.h'.]))
|
||||
AC_CHECK_LIB([spdk_nvme], [nvme_attach], [], AC_MSG_FAILURE([SPDK nvme_attach not found]))
|
||||
|
||||
SPDK_LIBS="-lspdk_nvme"
|
||||
AC_DEFINE([HAVE_SPDK], [1], [SPDK conditional compilation])
|
||||
AC_SUBST(SPDK_LIBS)
|
||||
fi
|
||||
|
||||
|
@ -233,6 +233,10 @@ if WITH_LIBZFS
|
||||
LIBOS += libos_zfs.a -lzfs
|
||||
endif # WITH_LIBZFS
|
||||
|
||||
if WITH_SPDK
|
||||
LIBOS += -lpciaccess -lspdk_nvme -lspdk_util -lspdk_memory -lrte_eal -lrte_mempool -lrte_ring
|
||||
endif # WITH_SPDK
|
||||
|
||||
if WITH_TCMALLOC_MINIMAL
|
||||
LIBPERFGLUE += -ltcmalloc_minimal
|
||||
endif # WITH_TCMALLOC_MINIMAL
|
||||
|
@ -120,9 +120,8 @@ noinst_LIBRARIES += libos_zfs.a
|
||||
noinst_HEADERS += os/fs/ZFS.h
|
||||
endif
|
||||
|
||||
if HAVE_SPDK
|
||||
if WITH_SPDK
|
||||
libos_a_CXXFLAGS = ${AM_CXXFLAGS} -I ${with_spdk}/include -fPIC
|
||||
libos_a_LIBADD += "-lspdk_nvme -lpciaccess -lpthread -lrte_eal -lrte_mempool -lrte_ring"
|
||||
libos_a_SOURCES += os/bluestore/NVMEDevice.cc
|
||||
noinst_HEADERS += os/bluestore/NVMEDevice.h
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user