[dpdk-dev,1/2] examples/ethtool: add to meson build
Checks
Commit Message
Add the ethtool example to the meson build. This example is more
complicated than the previously added ones as it has files in two
subdirectories. An ethtool "wrapper lib" in one, used by the actual
example "ethtool app" in the other.
Rather than using recursive operation, like is done with the makefiles,
we instead can just special-case the building of the library from the
single .c file, and then use that as a dependency when building the app
proper.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/ethtool/meson.build | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Comments
29/03/2018 16:04, Bruce Richardson:
> Add the ethtool example to the meson build. This example is more
> complicated than the previously added ones as it has files in two
> subdirectories. An ethtool "wrapper lib" in one, used by the actual
> example "ethtool app" in the other.
>
> Rather than using recursive operation, like is done with the makefiles,
> we instead can just special-case the building of the library from the
> single .c file, and then use that as a dependency when building the app
> proper.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
It does not compile because of experimental function:
examples/ethtool/lib/rte_ethtool.c:186:2: error:
‘rte_eth_dev_get_module_info’ is deprecated: Symbol is not yet part of stable ABI
On Thu, Jul 12, 2018 at 09:54:32AM +0200, Thomas Monjalon wrote:
> 29/03/2018 16:04, Bruce Richardson:
> > Add the ethtool example to the meson build. This example is more
> > complicated than the previously added ones as it has files in two
> > subdirectories. An ethtool "wrapper lib" in one, used by the actual
> > example "ethtool app" in the other.
> >
> > Rather than using recursive operation, like is done with the makefiles,
> > we instead can just special-case the building of the library from the
> > single .c file, and then use that as a dependency when building the app
> > proper.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> It does not compile because of experimental function:
> examples/ethtool/lib/rte_ethtool.c:186:2: error:
> ‘rte_eth_dev_get_module_info’ is deprecated: Symbol is not yet part of stable ABI
>
Ok. This set is fairly old, and I think I've found other issues with it
since. I suggest we drop this set for 18.08 consideration.
@@ -6,5 +6,14 @@
# 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 the ethtool wrapper as a lib, which app uses as a dependency
+ethtool_inc = include_directories('lib')
+ethtool_lib = static_library('rte_ethtool', 'lib/rte_ethtool.c',
+ include_directories: ethtool_inc,
+ dependencies: [static_rte_ethdev, static_rte_pmd_ixgbe])
+ethtool_dep = declare_dependency(link_with: ethtool_lib,
+ include_directories: ethtool_inc)
+
+# sample app files are in the ethtool-app subdir
+sources = files('ethtool-app/ethapp.c', 'ethtool-app/main.c')
+ext_deps += ethtool_dep