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@intel.com>
Acked-by: Rosen Xu <rosen.xu@altera.com>
---
drivers/raw/ifpga/base/meson.build | 21 ++-------------------
drivers/raw/ifpga/meson.build | 15 ++++++++++++---
2 files changed, 14 insertions(+), 22 deletions(-)
@@ -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)
+)
@@ -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')