]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Makefile: let spdk/dpdk libraries linked in upper layer
authorHaomai Wang <haomai@xsky.com>
Tue, 5 Jan 2016 05:54:00 +0000 (13:54 +0800)
committerHaomai Wang <haomai@xsky.com>
Mon, 1 Feb 2016 14:00:43 +0000 (22:00 +0800)
Signed-off-by: Haomai Wang <haomai@xsky.com>
configure.ac
src/Makefile-env.am
src/os/Makefile.am

index b0526708fc8b51afc3eb91e547ae3c89f00addef..e6e541e839c9451b9c98613d8552a8b043d3c6e9 100644 (file)
@@ -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
 
index bbf991a4cbf0799af82d73cb97d48d8fc0aa8965..fcf8ef4f5bab54c2da7b2312dba686150db4a326 100644 (file)
@@ -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
index 25f33964f7f5f6201abd206d8e28df5965c77117..f5467ec7f221fa7f055a5cd50254007d223156ae 100644 (file)
@@ -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