From: Haomai Wang Date: Mon, 4 Jan 2016 09:57:02 +0000 (+0800) Subject: makefile: add SPDK detect and NVMEDevice to Makefile X-Git-Tag: v10.0.4~81^2~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee4951d05c42ae4f7c76597d6c3e2a6b032e0ac7;p=ceph.git makefile: add SPDK detect and NVMEDevice to Makefile Signed-off-by: Haomai Wang --- diff --git a/configure.ac b/configure.ac index 906ad015a7b4..9175d052aaaa 100644 --- a/configure.ac +++ b/configure.ac @@ -721,6 +721,32 @@ if test "x$enable_xio" = x"yes"; then AC_SUBST(XIO_LIBS) fi +# +# SPDK +# +AC_ARG_ENABLE(spdk, + [AC_HELP_STRING([--with-spdk], [build Ceph SPDK Support])], [], [with_spdk=no]) + +AM_CONDITIONAL(HAVE_SPDK, [test "x$with_spdk" = "xyes"]) + +if test "x$with_spdk" = x"yes"; then + 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_SUBST(SPDK_LIBS) +fi + +# +# FreeBSD has it in base. +# +if test x"$freebsd" != x"yes" -a x"$with_radosgw" = x"yes"; then +PKG_CHECK_MODULES([LIBEDIT], [libedit >= 2.11], + [], AC_MSG_FAILURE([No usable version of libedit found.])) +else + LIBEDIT_LIBS="-ledit" +fi + #libatomic-ops? You want it! AC_ARG_WITH([libatomic-ops], [AS_HELP_STRING([--without-libatomic-ops], diff --git a/src/os/Makefile.am b/src/os/Makefile.am index 6048fe8c1d1f..ac11b8bd25ae 100644 --- a/src/os/Makefile.am +++ b/src/os/Makefile.am @@ -42,6 +42,7 @@ libos_a_SOURCES += \ os/bluestore/BlueRocksEnv.cc \ os/bluestore/BlueStore.cc \ os/bluestore/FreelistManager.cc \ + os/bluestore/KernelDevice.cc \ os/bluestore/StupidAllocator.cc endif @@ -107,6 +108,7 @@ noinst_HEADERS += \ os/bluestore/BlueFS.h \ os/bluestore/BlueRocksEnv.h \ os/bluestore/BlueStore.h \ + os/bluestore/KernelDevice.h \ os/bluestore/FreelistManager.h \ os/bluestore/StupidAllocator.h endif @@ -118,6 +120,11 @@ noinst_LIBRARIES += libos_zfs.a noinst_HEADERS += os/fs/ZFS.h endif +if HAVE_SPDK +libos_a_SOURCES += os/bluestore/NVMEDevice.cc +noinst_HEADERS += os/bluestore/NVMEDevice.h +endif + if WITH_LIBAIO ceph_bluefs_tool_SOURCES = os/bluestore/bluefs_tool.cc ceph_bluefs_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL)