DPDK patches and discussions
 help / color / mirror / Atom feed
From: Markus Theil <markus.theil@tu-ilmenau.de>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Thorben Roemer <thorben.roemer@secunet.com>
Subject: [PATCH v3 2/2] build: export dpdk_includes for subproject usage.
Date: Thu, 13 Oct 2022 17:35:39 +0200	[thread overview]
Message-ID: <20221013153537.7891-2-markus.theil@tu-ilmenau.de> (raw)
In-Reply-To: <20221012144704.77973-1-markus.theil@tu-ilmenau.de>

From: Thorben Roemer <thorben.roemer@secunet.com>

In order to perform things like LTO more easily in
our DPDK applications, we use DPDK as a meson subproject.
Also export includes in order to be usable in this context.

Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
---
 drivers/baseband/fpga_5gnr_fec/meson.build | 2 ++
 drivers/dma/dpaa2/meson.build              | 2 ++
 drivers/event/dlb2/meson.build             | 2 ++
 drivers/mempool/dpaa2/meson.build          | 2 ++
 drivers/net/atlantic/meson.build           | 2 ++
 drivers/net/bnxt/meson.build               | 2 ++
 drivers/net/bonding/meson.build            | 2 ++
 drivers/net/cnxk/meson.build               | 2 ++
 drivers/net/dpaa/meson.build               | 2 ++
 drivers/net/dpaa2/meson.build              | 2 ++
 drivers/net/i40e/meson.build               | 2 ++
 drivers/net/iavf/meson.build               | 2 ++
 drivers/net/ixgbe/meson.build              | 2 ++
 drivers/net/memif/meson.build              | 2 ++
 drivers/net/mlx5/meson.build               | 2 ++
 drivers/net/ring/meson.build               | 2 ++
 drivers/net/softnic/meson.build            | 2 ++
 drivers/net/vhost/meson.build              | 2 ++
 drivers/raw/cnxk_bphy/meson.build          | 2 ++
 drivers/raw/cnxk_gpio/meson.build          | 2 ++
 drivers/raw/dpaa2_cmdif/meson.build        | 2 ++
 drivers/raw/ifpga/meson.build              | 2 ++
 drivers/raw/ntb/meson.build                | 2 ++
 lib/meson.build                            | 1 +
 meson.build                                | 1 +
 25 files changed, 48 insertions(+)

diff --git a/drivers/baseband/fpga_5gnr_fec/meson.build b/drivers/baseband/fpga_5gnr_fec/meson.build
index 745cd271f2..b2b218e9f9 100644
--- a/drivers/baseband/fpga_5gnr_fec/meson.build
+++ b/drivers/baseband/fpga_5gnr_fec/meson.build
@@ -6,3 +6,5 @@ deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
 sources = files('rte_fpga_5gnr_fec.c')
 
 headers = files('rte_pmd_fpga_5gnr_fec.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/dma/dpaa2/meson.build b/drivers/dma/dpaa2/meson.build
index a99151e2a5..672f820f16 100644
--- a/drivers/dma/dpaa2/meson.build
+++ b/drivers/dma/dpaa2/meson.build
@@ -16,3 +16,5 @@ if cc.has_argument('-Wno-pointer-arith')
 endif
 
 headers = files('rte_pmd_dpaa2_qdma.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build
index 20ef159ab3..aeffc5d4da 100644
--- a/drivers/event/dlb2/meson.build
+++ b/drivers/event/dlb2/meson.build
@@ -65,3 +65,5 @@ endif
 headers = files('rte_pmd_dlb2.h')
 
 deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci']
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build
index 3d16d44158..559d36d9a8 100644
--- a/drivers/mempool/dpaa2/meson.build
+++ b/drivers/mempool/dpaa2/meson.build
@@ -10,3 +10,5 @@ deps += ['bus_fslmc']
 sources = files('dpaa2_hw_mempool.c')
 
 headers = files('rte_dpaa2_mempool.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/atlantic/meson.build b/drivers/net/atlantic/meson.build
index bf5e47eaaf..6a6d176b45 100644
--- a/drivers/net/atlantic/meson.build
+++ b/drivers/net/atlantic/meson.build
@@ -17,3 +17,5 @@ sources = files(
         'hw_atl/hw_atl_utils.c',
         'rte_pmd_atlantic.c',
 )
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 09d494e90f..af9a58ac9e 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -68,3 +68,5 @@ if arch_subdir == 'x86'
 elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
     sources += files('bnxt_rxtx_vec_neon.c')
 endif
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build
index 29022712cb..41b0903374 100644
--- a/drivers/net/bonding/meson.build
+++ b/drivers/net/bonding/meson.build
@@ -23,3 +23,5 @@ deps += ['ip_frag']
 
 headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 5efb2000cf..d43f0b53d1 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -195,3 +195,5 @@ endforeach
 
 headers = files('rte_pmd_cnxk.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/dpaa/meson.build b/drivers/net/dpaa/meson.build
index 42e1f8c2e2..6927c3644c 100644
--- a/drivers/net/dpaa/meson.build
+++ b/drivers/net/dpaa/meson.build
@@ -21,3 +21,5 @@ if cc.has_argument('-Wno-pointer-arith')
 endif
 
 headers = files('rte_pmd_dpaa.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
index 51598c048c..d5f71deb29 100644
--- a/drivers/net/dpaa2/meson.build
+++ b/drivers/net/dpaa2/meson.build
@@ -27,3 +27,5 @@ sources = files(
 includes += include_directories('base', 'mc')
 
 headers = files('rte_pmd_dpaa2.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index e00c1a9ef9..1f64814608 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -92,3 +92,5 @@ elif arch_subdir == 'arm'
 endif
 
 headers = files('rte_pmd_i40e.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 6df771f917..d27809059a 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -71,3 +71,5 @@ elif arch_subdir == 'arm'
 endif
 
 headers = files('rte_pmd_iavf.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index a18908ef7c..c2552276d5 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -36,3 +36,5 @@ endif
 includes += include_directories('base')
 
 headers = files('rte_pmd_ixgbe.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build
index 28416a982f..4cbe50fb2a 100644
--- a/drivers/net/memif/meson.build
+++ b/drivers/net/memif/meson.build
@@ -13,3 +13,5 @@ sources = files(
 
 deps += ['hash']
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 6a84d96380..9ecdcfda44 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -72,3 +72,5 @@ endif
 testpmd_sources += files('mlx5_testpmd.c')
 
 subdir(exec_env)
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build
index 72792e26b0..567857dcd8 100644
--- a/drivers/net/ring/meson.build
+++ b/drivers/net/ring/meson.build
@@ -10,3 +10,5 @@ endif
 sources = files('rte_eth_ring.c')
 headers = files('rte_eth_ring.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build
index 5dfbd16c77..451d70cddd 100644
--- a/drivers/net/softnic/meson.build
+++ b/drivers/net/softnic/meson.build
@@ -16,3 +16,5 @@ sources = files(
         'rte_eth_softnic_thread.c',
 )
 deps += ['pipeline', 'port', 'table']
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/vhost/meson.build b/drivers/net/vhost/meson.build
index f481a3a4b8..6023bcb179 100644
--- a/drivers/net/vhost/meson.build
+++ b/drivers/net/vhost/meson.build
@@ -10,3 +10,5 @@ endif
 deps += 'vhost'
 sources = files('rte_eth_vhost.c')
 headers = files('rte_eth_vhost.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/cnxk_bphy/meson.build b/drivers/raw/cnxk_bphy/meson.build
index ffb0ee6b7e..591a24321b 100644
--- a/drivers/raw/cnxk_bphy/meson.build
+++ b/drivers/raw/cnxk_bphy/meson.build
@@ -11,3 +11,5 @@ sources = files(
 )
 headers = files('rte_pmd_bphy.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build
index f52a7be9eb..2139e21621 100644
--- a/drivers/raw/cnxk_gpio/meson.build
+++ b/drivers/raw/cnxk_gpio/meson.build
@@ -10,3 +10,5 @@ sources = files(
 )
 headers = files('rte_pmd_cnxk_gpio.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/dpaa2_cmdif/meson.build b/drivers/raw/dpaa2_cmdif/meson.build
index 3b1d3371b2..c01f4ceefd 100644
--- a/drivers/raw/dpaa2_cmdif/meson.build
+++ b/drivers/raw/dpaa2_cmdif/meson.build
@@ -5,3 +5,5 @@ deps += ['rawdev', 'mempool_dpaa2', 'bus_vdev']
 sources = files('dpaa2_cmdif.c')
 
 headers = files('rte_pmd_dpaa2_cmdif.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index cc30dc8be7..28ec996bba 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -22,3 +22,5 @@ includes += include_directories('../../net/ipn3ke')
 includes += include_directories('../../net/i40e')
 
 headers = files('rte_pmd_ifpga.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/ntb/meson.build b/drivers/raw/ntb/meson.build
index 9096f2b25a..b5a7693f60 100644
--- a/drivers/raw/ntb/meson.build
+++ b/drivers/raw/ntb/meson.build
@@ -5,3 +5,5 @@ deps += ['rawdev', 'mbuf', 'mempool', 'pci', 'bus_pci']
 sources = files('ntb.c',
                 'ntb_hw_intel.c')
 headers = files('rte_pmd_ntb.h')
+
+dpdk_includes += include_directories('.')
diff --git a/lib/meson.build b/lib/meson.build
index f858844fa2..85113d0b47 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -190,6 +190,7 @@ foreach l:libraries
 
     libname = 'rte_' + name
     includes += include_directories(l)
+    dpdk_includes += include_directories(l)
 
     if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
diff --git a/meson.build b/meson.build
index 1d35a255c3..d1cf039297 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,7 @@ cc = meson.get_compiler('c')
 dpdk_source_root = meson.current_source_dir()
 dpdk_build_root = meson.current_build_dir()
 dpdk_conf = configuration_data()
+dpdk_includes = []
 dpdk_libraries = []
 dpdk_static_libraries = []
 dpdk_shared_lib_deps = []
-- 
2.38.0


  parent reply	other threads:[~2022-10-13 15:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-12 15:21   ` Bruce Richardson
2022-10-13 15:12     ` Markus Theil
2022-10-12 15:19 ` [PATCH 1/2] build: allow to conditionally build apps Bruce Richardson
2022-10-13 15:11   ` Markus Theil
2022-10-13 16:36     ` Bruce Richardson
2022-10-13 15:31 ` [PATCH v2 " Markus Theil
2022-10-13 15:31   ` [PATCH v2 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-13 15:41     ` Stephen Hemminger
2022-10-13 15:35 ` [PATCH v3 1/2] build: allow to conditionally build apps Markus Theil
2022-10-14  7:51   ` [PATCH v4 " Markus Theil
2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-14  8:45       ` Bruce Richardson
2022-10-14  8:44     ` [PATCH v4 1/2] build: allow to conditionally build apps Bruce Richardson
2022-10-28 12:31       ` David Marchand
2022-10-27 13:13     ` David Marchand
2022-10-27 14:22       ` David Marchand
2022-10-28  6:43         ` Markus Theil
2022-10-13 15:35 ` Markus Theil [this message]
2022-10-13 16:38   ` [PATCH v3 2/2] build: export dpdk_includes for subproject usage Bruce Richardson
2022-10-14  7:56     ` Markus Theil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221013153537.7891-2-markus.theil@tu-ilmenau.de \
    --to=markus.theil@tu-ilmenau.de \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thorben.roemer@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).