[v3,2/9] examples/ethtool: allow building as part of meson build

Message ID 20191022154310.41238-3-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Headers
Series support all examples in a meson build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson Oct. 22, 2019, 3:43 p.m. UTC
  Since the code for the ethtool example was contained in subdirectories the
compilation of this example is different from most of the other apps, and
it had not been abled when the user requests a build with "-Dexamples=all".

To simplify the build with meson, the separate ethtool library is not build
separately, rather the app is built as a single entity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
V3: disable on non-linux
---
 examples/ethtool/meson.build | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
  

Patch

diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build
index c370d7476..bc7a35514 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -6,5 +6,15 @@ 
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-# Example app currently unsupported by meson build
-build = false
+build = is_linux
+sources = files('lib/rte_ethtool.c',
+	'ethtool-app/ethapp.c',
+	'ethtool-app/main.c')
+includes = include_directories('lib', 'ethtool-app')
+
+deps += 'bus_pci'
+if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
+	deps += 'pmd_ixgbe'
+endif
+
+allow_experimental_apis = true