diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:25:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:34:52 +0000 |
commit | 9ecff41dd11e920286f9be670a0ec3a668371d1d (patch) | |
tree | 89c73ab6742847ca5f12056e6c0dd4ec6bbe79d0 /src/meson.build | |
parent | Adding debian version 1.0-1. (diff) | |
download | libnvme-9ecff41dd11e920286f9be670a0ec3a668371d1d.tar.xz libnvme-9ecff41dd11e920286f9be670a0ec3a668371d1d.zip |
Merging upstream version 1.1~rc0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/meson.build')
-rw-r--r-- | src/meson.build | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/src/meson.build b/src/meson.build index b573b19..3076be6 100644 --- a/src/meson.build +++ b/src/meson.build @@ -16,6 +16,13 @@ sources = [ 'nvme/util.c', ] +mi_sources = [ + 'nvme/cleanup.c', + 'nvme/log.c', + 'nvme/mi.c', + 'nvme/mi-mctp.c', +] + if conf.get('CONFIG_JSONC') sources += 'nvme/json.c' endif @@ -26,9 +33,16 @@ deps = [ openssl_dep, ] +mi_deps = [ + libuuid_dep, + libsystemd_dep, +] + source_dir = meson.current_source_dir() mapfile = 'libnvme.map' version_script_arg = join_paths(source_dir, mapfile) +mi_mapfile = 'libnvme-mi.map' +mi_version_script_arg = join_paths(source_dir, mi_mapfile) libnvme = library( 'nvme', # produces libnvme.so @@ -53,13 +67,65 @@ pkg.generate(libnvme, libnvme_dep = declare_dependency( include_directories: ['.'], - dependencies: deps, + dependencies: [ + libuuid_dep.partial_dependency(compile_args: true, includes: true), + json_c_dep.partial_dependency(compile_args: true, includes: true), + ], link_with: libnvme, ) +libnvme_mi = library( + 'nvme-mi', # produces libnvme-mi.so + mi_sources, + version: library_version, + link_args: ['-Wl,--version-script=' + mi_version_script_arg], + dependencies: mi_deps, + link_depends: mi_mapfile, + include_directories: [incdir, internal_incdir], + install: true, + link_with: libccan, +) + +libnvme_mi_dep = declare_dependency( + include_directories: ['.'], + dependencies: [ + libuuid_dep.partial_dependency(compile_args: true, includes: true), + ], + link_with: libnvme_mi, +) + +# test library with all symbols visible, to use for MI unit tests. Should +# match libnvme_mi above, but with no version script, and install: false. +libnvme_mi_test = library( + 'nvme-mi-test', # produces libnvme-mi-test.so + mi_sources, + dependencies: mi_deps, + include_directories: [incdir, internal_incdir], + install: false, + link_with: libccan, +) + +libnvme_mi_test_dep = declare_dependency( + include_directories: ['.'], + dependencies: [ + libuuid_dep.partial_dependency(compile_args: true, includes: true), + ], + link_with: libnvme_mi_test, +) + +pkg.generate(libnvme_mi, + filebase: 'libnvme-mi', + name: 'libnvme-mi', + version: meson.project_version(), + description: 'Manage "libnvme" subsystem devices (Non-volatile Memory Express) over Management Interface', + url: 'http://github.com/linux-nvme/libnvme/', +) + mode = ['rw-r--r--', 0, 0] install_headers('libnvme.h', install_mode: mode) +install_headers('libnvme-mi.h', install_mode: mode) install_headers([ + 'nvme/api-types.h', 'nvme/fabrics.h', 'nvme/filters.h', 'nvme/ioctl.h', @@ -68,6 +134,7 @@ install_headers([ 'nvme/tree.h', 'nvme/types.h', 'nvme/util.h', + 'nvme/mi.h', ], subdir: 'nvme', install_mode: mode, |