[PATCH 10/10] raw/ifpga: use common base code build handling
Xu, Rosen
rosen.xu at altera.com
Tue Apr 1 02:27:41 CEST 2025
Hi,
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson at intel.com>
> Sent: Tuesday, April 1, 2025 12:10 AM
> To: dev at dpdk.org
> Cc: Bruce Richardson <bruce.richardson at intel.com>; Xu, Rosen
> <rosen.xu at altera.com>
> Subject: [PATCH 10/10] raw/ifpga: use common base code build handling
>
> [You don't often get email from bruce.richardson at intel.com. Learn why this
> is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Use the base code build handling logic in the drivers/meson.build file, rather
> than re-implementing it in the driver itself.
>
> While making changes similar to that in other drivers, also move content
> around dependencies from the base/meson.build file to the main driver
> meson.build file, so that the base code file only contains the list of base code
> files.
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
> drivers/raw/ifpga/base/meson.build | 21 ++-------------------
> drivers/raw/ifpga/meson.build | 15 ++++++++++++---
> 2 files changed, 14 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/raw/ifpga/base/meson.build
> b/drivers/raw/ifpga/base/meson.build
> index 2de8e7ea22..efebff94e9 100644
> --- a/drivers/raw/ifpga/base/meson.build
> +++ b/drivers/raw/ifpga/base/meson.build
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel
> Corporation
>
> -sources = [
> +base_sources = files(
> 'ifpga_api.c',
> 'ifpga_enumerate.c',
> 'ifpga_feature_dev.c',
> @@ -23,21 +23,4 @@ sources = [
> 'opae_i2c.c',
> 'opae_at24_eeprom.c',
> 'opae_eth_group.c',
> -]
> -
> -rtdep = dependency('librt', required: false) -if not rtdep.found()
> - rtdep = cc.find_library('rt', required: false)
> -endif
> -if not rtdep.found()
> - build = false
> - reason = 'missing dependency, "librt"'
> - subdir_done()
> -endif
> -
> -ext_deps += rtdep
> -
> -base_lib = static_library('ifpga_rawdev_base', sources,
> - dependencies: static_rte_eal,
> - c_args: cflags)
> -base_objs = base_lib.extract_all_objects(recursive: true)
> +)
> diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
> index 444799cfb2..4295ec04bd 100644
> --- a/drivers/raw/ifpga/meson.build
> +++ b/drivers/raw/ifpga/meson.build
> @@ -7,8 +7,19 @@ if not has_libfdt
> subdir_done()
> endif
>
> +rtdep = dependency('librt', required: false) if not rtdep.found()
> + rtdep = cc.find_library('rt', required: false) endif if not
> +rtdep.found()
> + build = false
> + reason = 'missing dependency, "librt"'
> + subdir_done()
> +endif
> +
> +ext_deps += rtdep
> +
> subdir('base')
> -objs = [base_objs]
>
> deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs',
> 'bus_vdev', 'bus_ifpga', 'net', 'net_i40e', 'net_ipn3ke'] @@ -17,6 +28,4 @@
> sources = files('ifpga_rawdev.c', 'rte_pmd_ifpga.c', 'afu_pmd_core.c',
> 'afu_pmd_n3000.c', 'afu_pmd_he_lpbk.c', 'afu_pmd_he_mem.c',
> 'afu_pmd_he_hssi.c')
>
> -includes += include_directories('base')
> -
> headers = files('rte_pmd_ifpga.h')
> --
> 2.45.2
Acked-by: Rosen Xu <rosen.xu at altera.com>
More information about the dev
mailing list