summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2018-04-27 14:49:26 +0100
committerBruce Richardson <bruce.richardson@intel.com>2018-05-08 22:21:38 +0200
commit89200580ef0f89ef247ca32e9299c670beb95cc0 (patch)
treeeae0aa6e06c2020efaf5f46f5d774579dc92134a /meson.build
parent776d64ffb7cff60a5500c8f33704787d0bae428a (diff)
downloaddpdk-89200580ef0f89ef247ca32e9299c670beb95cc0.zip
dpdk-89200580ef0f89ef247ca32e9299c670beb95cc0.tar.gz
dpdk-89200580ef0f89ef247ca32e9299c670beb95cc0.tar.xz
kernel: fix cross-build of Linux modules with meson
When cross-compiling, if no kernel_dir was specified, then the kernel modules were still being compiled for the build machine. Fix this by only building modules on cross-compile when we have a kernel_dir value set. Print out a message indicating why we are skipping kernel compilation, and in case that the headers for kernel compile are not found, print a warning instead of erroring out. Fixes: a52f4574f798 ("igb_uio: build with meson") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index f99f072..af134d3 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,6 @@ subdir('config')
# build libs and drivers
subdir('lib')
-subdir('kernel')
subdir('buildtools')
subdir('drivers')
@@ -40,6 +39,11 @@ if get_option('examples') != ''
subdir('examples')
endif
+# build kernel modules if enabled
+if get_option('enable_kmods')
+ subdir('kernel')
+endif
+
# write the build config
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,