]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
makefile: add SPDK detect and NVMEDevice to Makefile
authorHaomai Wang <haomai@xsky.com>
Mon, 4 Jan 2016 09:57:02 +0000 (17:57 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 1 Feb 2016 14:00:42 +0000 (22:00 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
configure.ac
src/os/Makefile.am

index 906ad015a7b40cdd71f492e4f931a6f5fe35dbfd..9175d052aaaa4bbd48bb914065970f794fdd87b7 100644 (file)
@@ -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],
index 6048fe8c1d1f28807bd8375a387f1ba7431fce95..ac11b8bd25aebdc2b857e3abf9e0164f63f5c73f 100644 (file)
@@ -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)