diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/spdk/dpdk/kernel/freebsd/meson.build | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/dpdk/kernel/freebsd/meson.build')
-rw-r--r-- | src/spdk/dpdk/kernel/freebsd/meson.build | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/spdk/dpdk/kernel/freebsd/meson.build b/src/spdk/dpdk/kernel/freebsd/meson.build new file mode 100644 index 000000000..dc156a43f --- /dev/null +++ b/src/spdk/dpdk/kernel/freebsd/meson.build @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation + +kmods = ['contigmem', 'nic_uio'] + +# for building kernel modules, we use kernel build system using make, as +# with Linux. We have a skeleton BSDmakefile, which pulls many of its +# values from the environment. Each module only has a single source file +# right now, which allows us to simplify things. We pull in the sourcer +# files from the individual meson.build files, and then use a custom +# target to call make, passing in the values as env parameters. +kmod_cflags = ['-I' + meson.build_root(), + '-I' + join_paths(meson.source_root(), 'config'), + '-include rte_config.h'] + +# to avoid warnings due to race conditions with creating the dev_if.h, etc. +# files, serialize the kernel module builds. Each module will depend on +# previous ones +built_kmods = [] +foreach k:kmods + subdir(k) + built_kmods += custom_target(k, + input: [files('BSDmakefile.meson'), sources], + output: k + '.ko', + command: ['make', '-f', '@INPUT0@', + 'KMOD_OBJDIR=@OUTDIR@', + 'KMOD_SRC=@INPUT1@', + 'KMOD=' + k, + 'KMOD_CFLAGS=' + ' '.join(kmod_cflags), + 'CC=clang'], + depends: built_kmods, # make each module depend on prev + build_by_default: get_option('enable_kmods'), + install: get_option('enable_kmods'), + install_dir: '/boot/modules/') +endforeach |