drivers: add headers install helper

A lot of drivers export headers, reproduce the same facility than for
libraries.

Note: this change fixes an issue with the crypto scheduler headers which
were not installed properly. A separate backport will be sent to stable
branches.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
David Marchand 2020-10-22 09:55:45 +02:00
parent a5c369d486
commit 30105f664f
24 changed files with 28 additions and 22 deletions

View File

@ -987,5 +987,8 @@ reason
sources [mandatory]
As above
headers
As above
version
As above

View File

@ -5,4 +5,4 @@ deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
sources = files('rte_acc100_pmd.c')
install_headers('rte_acc100_cfg.h')
headers = files('rte_acc100_cfg.h')

View File

@ -5,4 +5,4 @@ deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
sources = files('rte_fpga_5gnr_fec.c')
install_headers('rte_pmd_fpga_5gnr_fec.h')
headers = files('rte_pmd_fpga_5gnr_fec.h')

View File

@ -8,5 +8,5 @@ if is_windows
endif
deps += ['pci', 'kvargs', 'rawdev']
install_headers('rte_bus_ifpga.h')
headers = files('rte_bus_ifpga.h')
sources = files('ifpga_common.c', 'ifpga_bus.c')

View File

@ -2,7 +2,7 @@
# Copyright(c) 2017 Intel Corporation
deps += ['pci']
install_headers('rte_bus_pci.h')
headers = files('rte_bus_pci.h')
sources = files('pci_common.c',
'pci_params.c')
if is_linux

View File

@ -3,6 +3,6 @@
sources = files('vdev.c',
'vdev_params.c')
install_headers('rte_bus_vdev.h')
headers = files('rte_bus_vdev.h')
deps += ['kvargs']

View File

@ -7,7 +7,7 @@ if is_windows
endif
install_headers('rte_bus_vmbus.h','rte_vmbus_reg.h')
headers = files('rte_bus_vmbus.h','rte_vmbus_reg.h')
sources = files('vmbus_common.c',
'vmbus_channel.c',

View File

@ -9,4 +9,4 @@ endif
deps += ['bus_fslmc']
sources = files('dpaa2_hw_mempool.c')
install_headers('rte_dpaa2_mempool.h')
headers = files('rte_dpaa2_mempool.h')

View File

@ -60,6 +60,7 @@ foreach subpath:subdirs
name = drv
fmt_name = ''
sources = []
headers = []
objs = []
cflags = default_cflags
includes = [include_directories(drv_path)]
@ -136,6 +137,8 @@ foreach subpath:subdirs
dpdk_extra_ldflags += pkgconfig_extra_libs
install_headers(headers)
# generate pmdinfo sources by building a temporary
# lib and then running pmdinfogen on the contents of
# that lib. The final lib reuses the object files and

View File

@ -6,4 +6,4 @@ if not is_linux
reason = 'only supported on linux'
endif
sources = files('avp_ethdev.c')
install_headers('rte_avp_common.h', 'rte_avp_fifo.h')
headers = files('rte_avp_common.h', 'rte_avp_fifo.h')

View File

@ -2,7 +2,7 @@
# Copyright(c) 2018 Intel Corporation
# Copyright(c) 2020 Broadcom
install_headers('rte_pmd_bnxt.h')
headers = files('rte_pmd_bnxt.h')
includes += include_directories('tf_ulp')
includes += include_directories('tf_core')

View File

@ -8,4 +8,4 @@ sources = files('rte_eth_bond_api.c', 'rte_eth_bond_pmd.c', 'rte_eth_bond_flow.c
deps += 'sched' # needed for rte_bitmap.h
deps += ['ip_frag']
install_headers('rte_eth_bond.h', 'rte_eth_bond_8023ad.h')
headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h')

View File

@ -18,4 +18,4 @@ if cc.has_argument('-Wno-pointer-arith')
cflags += '-Wno-pointer-arith'
endif
install_headers('rte_pmd_dpaa.h')
headers = files('rte_pmd_dpaa.h')

View File

@ -21,4 +21,4 @@ sources = files('base/dpaa2_hw_dpni.c',
includes += include_directories('base', 'mc')
install_headers('rte_pmd_dpaa2.h')
headers = files('rte_pmd_dpaa2.h')

View File

@ -52,4 +52,4 @@ elif arch_subdir == 'arm'
sources += files('i40e_rxtx_vec_neon.c')
endif
install_headers('rte_pmd_i40e.h')
headers = files('rte_pmd_i40e.h')

View File

@ -39,4 +39,4 @@ sources += files('ice_dcf.c',
'ice_dcf_ethdev.c',
'ice_dcf_parent.c')
install_headers('rte_pmd_ice.h')
headers = files('rte_pmd_ice.h')

View File

@ -30,4 +30,4 @@ endif
includes += include_directories('base')
install_headers('rte_pmd_ixgbe.h')
headers = files('rte_pmd_ixgbe.h')

View File

@ -2,4 +2,4 @@
# Copyright(c) 2017 Intel Corporation
sources = files('rte_eth_ring.c')
install_headers('rte_eth_ring.h')
headers = files('rte_eth_ring.h')

View File

@ -5,7 +5,7 @@ if not is_linux
build = false
reason = 'only supported on linux'
endif
install_headers('rte_eth_softnic.h')
headers = files('rte_eth_softnic.h')
sources = files('rte_eth_softnic_tm.c',
'rte_eth_softnic.c',
'rte_eth_softnic_mempool.c',

View File

@ -4,5 +4,5 @@
build = dpdk_conf.has('RTE_LIB_VHOST')
reason = 'missing dependency, DPDK vhost library'
sources = files('rte_eth_vhost.c')
install_headers('rte_eth_vhost.h')
headers = files('rte_eth_vhost.h')
deps += 'vhost'

View File

@ -6,4 +6,4 @@ reason = 'missing dependency, DPDK DPAA2 mempool driver'
deps += ['rawdev', 'mempool_dpaa2', 'bus_vdev']
sources = files('dpaa2_cmdif.c')
install_headers('rte_pmd_dpaa2_cmdif.h')
headers = files('rte_pmd_dpaa2_cmdif.h')

View File

@ -6,4 +6,4 @@ reason = 'missing dependency, DPDK DPAA2 mempool driver'
deps += ['rawdev', 'mempool_dpaa2', 'ring', 'kvargs']
sources = files('dpaa2_qdma.c')
install_headers('rte_pmd_dpaa2_qdma.h')
headers = files('rte_pmd_dpaa2_qdma.h')

View File

@ -14,5 +14,5 @@ deps += ['bus_pci',
'mbuf',
'rawdev']
install_headers('rte_ioat_rawdev.h',
headers = files('rte_ioat_rawdev.h',
'rte_ioat_rawdev_fns.h')

View File

@ -5,4 +5,4 @@ deps += ['rawdev', 'mbuf', 'mempool',
'pci', 'bus_pci']
sources = files('ntb.c',
'ntb_hw_intel.c')
install_headers('rte_pmd_ntb.h')
headers = files('rte_pmd_ntb.h')