* [dpdk-dev] [PATCH 0/8] Support sample applications with new build system
@ 2017-10-17 16:12 Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file Bruce Richardson
` (8 more replies)
0 siblings, 9 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
This patchset enables sample apps to be used with the new meson build
system. The work is really three-fold:
* fix issues and pre-requisites to get the sample apps compiling, such as
ensuring that all needed PMDs are enabled, e.g. bond PMD for bond example
* allow examples - one or more - to built as part of a regular build, so as
to allow easier testing of feature X using its sample app
* change the example app Makefiles so that when compiled as standalone
entities they use the pkg-config information when available, and only the
DPDK makefile system if pkgconfig info is not installed.
Bruce Richardson (8):
build: add maths library to libs in pkg-config file
build: add detection and use of libnuma
lpm: install vector header files
event: add skeleton and sw eventdevs to meson build
net/bonding: add to meson build
examples: allow building examples as part of a meson build
examples: put app name and sources at top of makefiles
examples: use pkg-config info when building examples
config/meson.build | 11 ++++
drivers/event/meson.build | 35 ++++++++++
drivers/event/skeleton/meson.build | 32 +++++++++
drivers/event/sw/meson.build | 37 +++++++++++
drivers/meson.build | 2 +-
drivers/net/bonding/meson.build | 39 +++++++++++
drivers/net/meson.build | 3 +-
examples/bond/Makefile | 35 ++++++++--
examples/bond/meson.build | 40 ++++++++++++
examples/cmdline/Makefile | 29 +++++++++
examples/cmdline/meson.build | 39 +++++++++++
examples/distributor/Makefile | 35 ++++++++--
examples/distributor/meson.build | 40 ++++++++++++
examples/eventdev_pipeline_sw_pmd/Makefile | 35 ++++++++--
examples/eventdev_pipeline_sw_pmd/meson.build | 40 ++++++++++++
examples/exception_path/Makefile | 35 ++++++++--
examples/exception_path/meson.build | 39 +++++++++++
examples/helloworld/Makefile | 35 ++++++++--
examples/helloworld/meson.build | 39 +++++++++++
examples/ip_fragmentation/Makefile | 35 ++++++++--
examples/ip_fragmentation/meson.build | 40 ++++++++++++
examples/ip_pipeline/Makefile | 93 ++++++++++++++++++---------
examples/ip_pipeline/meson.build | 63 ++++++++++++++++++
examples/ip_reassembly/Makefile | 35 ++++++++--
examples/ip_reassembly/meson.build | 40 ++++++++++++
examples/ipsec-secgw/Makefile | 55 +++++++++++-----
examples/ipsec-secgw/meson.build | 41 ++++++++++++
examples/ipv4_multicast/Makefile | 35 ++++++++--
examples/ipv4_multicast/meson.build | 40 ++++++++++++
examples/kni/Makefile | 34 ++++++++--
examples/kni/meson.build | 40 ++++++++++++
examples/l2fwd-cat/Makefile | 37 +++++++++--
examples/l2fwd-cat/meson.build | 42 ++++++++++++
examples/l2fwd-crypto/Makefile | 34 ++++++++--
examples/l2fwd-crypto/meson.build | 40 ++++++++++++
examples/l2fwd-jobstats/Makefile | 34 ++++++++--
examples/l2fwd-jobstats/meson.build | 40 ++++++++++++
examples/l2fwd-keepalive/Makefile | 36 +++++++++--
examples/l2fwd-keepalive/meson.build | 40 ++++++++++++
examples/l2fwd/Makefile | 34 ++++++++--
examples/l2fwd/meson.build | 39 +++++++++++
examples/l3fwd-acl/Makefile | 34 ++++++++--
examples/l3fwd-acl/meson.build | 40 ++++++++++++
examples/l3fwd-power/Makefile | 34 ++++++++--
examples/l3fwd-power/meson.build | 40 ++++++++++++
examples/l3fwd-vf/Makefile | 34 ++++++++--
examples/l3fwd-vf/meson.build | 40 ++++++++++++
examples/l3fwd/Makefile | 34 ++++++++--
examples/l3fwd/meson.build | 40 ++++++++++++
examples/link_status_interrupt/Makefile | 34 ++++++++--
examples/link_status_interrupt/meson.build | 39 +++++++++++
examples/load_balancer/Makefile | 34 ++++++++--
examples/load_balancer/meson.build | 40 ++++++++++++
examples/meson.build | 59 +++++++++++++++++
examples/multi_process/l2fwd_fork/Makefile | 12 ++--
examples/packet_ordering/Makefile | 34 ++++++++--
examples/packet_ordering/meson.build | 40 ++++++++++++
examples/ptpclient/Makefile | 34 ++++++++--
examples/ptpclient/meson.build | 39 +++++++++++
examples/qos_meter/Makefile | 34 ++++++++--
examples/qos_meter/meson.build | 40 ++++++++++++
examples/qos_sched/Makefile | 34 ++++++++--
examples/qos_sched/meson.build | 41 ++++++++++++
examples/rxtx_callbacks/Makefile | 34 ++++++++--
examples/rxtx_callbacks/meson.build | 39 +++++++++++
examples/skeleton/Makefile | 34 ++++++++--
examples/skeleton/meson.build | 39 +++++++++++
examples/tep_termination/Makefile | 34 ++++++++--
examples/tep_termination/meson.build | 40 ++++++++++++
examples/timer/Makefile | 34 ++++++++--
examples/timer/meson.build | 40 ++++++++++++
examples/vhost/Makefile | 34 ++++++++--
examples/vhost/meson.build | 40 ++++++++++++
examples/vhost_scsi/Makefile | 39 ++++++++---
examples/vhost_scsi/meson.build | 41 ++++++++++++
examples/vmdq/Makefile | 34 ++++++++--
examples/vmdq/meson.build | 39 +++++++++++
examples/vmdq_dcb/Makefile | 34 ++++++++--
examples/vmdq_dcb/meson.build | 39 +++++++++++
lib/librte_eal/linuxapp/eal/meson.build | 3 +
lib/librte_lpm/meson.build | 3 +
lib/librte_vhost/meson.build | 3 +
meson.build | 5 ++
meson_options.txt | 2 +
84 files changed, 2699 insertions(+), 248 deletions(-)
create mode 100644 drivers/event/meson.build
create mode 100644 drivers/event/skeleton/meson.build
create mode 100644 drivers/event/sw/meson.build
create mode 100644 drivers/net/bonding/meson.build
create mode 100644 examples/bond/meson.build
create mode 100644 examples/cmdline/meson.build
create mode 100644 examples/distributor/meson.build
create mode 100644 examples/eventdev_pipeline_sw_pmd/meson.build
create mode 100644 examples/exception_path/meson.build
create mode 100644 examples/helloworld/meson.build
create mode 100644 examples/ip_fragmentation/meson.build
create mode 100644 examples/ip_pipeline/meson.build
create mode 100644 examples/ip_reassembly/meson.build
create mode 100644 examples/ipsec-secgw/meson.build
create mode 100644 examples/ipv4_multicast/meson.build
create mode 100644 examples/kni/meson.build
create mode 100644 examples/l2fwd-cat/meson.build
create mode 100644 examples/l2fwd-crypto/meson.build
create mode 100644 examples/l2fwd-jobstats/meson.build
create mode 100644 examples/l2fwd-keepalive/meson.build
create mode 100644 examples/l2fwd/meson.build
create mode 100644 examples/l3fwd-acl/meson.build
create mode 100644 examples/l3fwd-power/meson.build
create mode 100644 examples/l3fwd-vf/meson.build
create mode 100644 examples/l3fwd/meson.build
create mode 100644 examples/link_status_interrupt/meson.build
create mode 100644 examples/load_balancer/meson.build
create mode 100644 examples/meson.build
create mode 100644 examples/packet_ordering/meson.build
create mode 100644 examples/ptpclient/meson.build
create mode 100644 examples/qos_meter/meson.build
create mode 100644 examples/qos_sched/meson.build
create mode 100644 examples/rxtx_callbacks/meson.build
create mode 100644 examples/skeleton/meson.build
create mode 100644 examples/tep_termination/meson.build
create mode 100644 examples/timer/meson.build
create mode 100644 examples/vhost/meson.build
create mode 100644 examples/vhost_scsi/meson.build
create mode 100644 examples/vmdq/meson.build
create mode 100644 examples/vmdq_dcb/meson.build
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 18:11 ` Luca Boccassi
2017-10-17 16:12 ` [dpdk-dev] [PATCH 2/8] build: add detection and use of libnuma Bruce Richardson
` (7 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Since a number of libraries depend on the maths lib, as well as adding it
to the project args, we also need to add it to the pkgconfig file args.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/config/meson.build b/config/meson.build
index db68a08d4..542fea4de 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
add_project_arguments('-march=@0@'.format(machine), language: 'c')
# some libs depend on maths lib
add_project_link_arguments('-lm', language: 'c')
+dpdk_extra_ldflags += '-lm'
# add -include rte_config to cflags
add_project_arguments('-include', 'rte_config.h', language: 'c')
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 2/8] build: add detection and use of libnuma
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 3/8] lpm: install vector header files Bruce Richardson
` (6 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
DPDK has an optional dependency on libnuma, so manage that through the
build system, by dynamically detecting the presence of the needed library
and header files. Since this library is used by both EAL and vhost, check
for the presence at the top level in the config directory.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/meson.build | 10 ++++++++++
lib/librte_eal/linuxapp/eal/meson.build | 3 +++
lib/librte_vhost/meson.build | 3 +++
3 files changed, 16 insertions(+)
diff --git a/config/meson.build b/config/meson.build
index 542fea4de..ce26a29f0 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -37,6 +37,16 @@ add_project_arguments('-march=@0@'.format(machine), language: 'c')
add_project_link_arguments('-lm', language: 'c')
dpdk_extra_ldflags += '-lm'
+# check for libraries used in multiple places in DPDK
+has_libnuma = 0
+numa_dep = cc.find_library('numa', required: false)
+if numa_dep.found() and cc.has_header('numaif.h')
+ dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
+ has_libnuma = 1
+ add_project_link_arguments('-lnuma', language: 'c')
+ dpdk_extra_ldflags += '-lnuma'
+endif
+
# add -include rte_config to cflags
add_project_arguments('-include', 'rte_config.h', language: 'c')
diff --git a/lib/librte_eal/linuxapp/eal/meson.build b/lib/librte_eal/linuxapp/eal/meson.build
index c0ceacd61..0d1ebad2f 100644
--- a/lib/librte_eal/linuxapp/eal/meson.build
+++ b/lib/librte_eal/linuxapp/eal/meson.build
@@ -50,6 +50,9 @@ sources = ['eal_alarm.c',
]
eal_extra_link_arg = '-ldl'
+if has_libnuma == 1
+ dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
+endif
if get_option('per_library_versions')
lib_version = '@0@.1'.format(version)
diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index 9674dd056..c62c9ead2 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -32,6 +32,9 @@
if host_machine.system() != 'linux'
build = false
endif
+if has_libnuma == 1
+ dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
+endif
version = 4
sources = files('fd_man.c', 'iotlb.c', 'socket.c', 'vhost.c', 'vhost_user.c',
'virtio_net.c')
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 3/8] lpm: install vector header files
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 2/8] build: add detection and use of libnuma Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 4/8] event: add skeleton and sw eventdevs to meson build Bruce Richardson
` (5 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The main rte_lpm.h header file also includes architecture specific headers,
depending on the architecture on which it is used. These also need to be
installed into the include directory as part of the "ninja install"
process. Thankfully, since the vector headers all have different names we
can just install all 3 of them in all cases, which avoids conflicts or
issues with multi-architecture installs, or the need to use
architecture-specific subdirectories.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_lpm/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build
index af88a97ec..8e4eb7c31 100644
--- a/lib/librte_lpm/meson.build
+++ b/lib/librte_lpm/meson.build
@@ -32,4 +32,7 @@
version = 2
sources = files('rte_lpm.c', 'rte_lpm6.c')
headers = files('rte_lpm.h', 'rte_lpm6.h')
+# since header files have different names, we can install all vector headers
+# without worrying about which architecture we actually need
+headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h')
deps += ['compat']
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 4/8] event: add skeleton and sw eventdevs to meson build
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (2 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 3/8] lpm: install vector header files Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 5/8] net/bonding: add " Bruce Richardson
` (4 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/event/meson.build | 35 +++++++++++++++++++++++++++++++++++
drivers/event/skeleton/meson.build | 32 ++++++++++++++++++++++++++++++++
drivers/event/sw/meson.build | 37 +++++++++++++++++++++++++++++++++++++
drivers/meson.build | 2 +-
4 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 drivers/event/meson.build
create mode 100644 drivers/event/skeleton/meson.build
create mode 100644 drivers/event/sw/meson.build
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
new file mode 100644
index 000000000..acca7dc78
--- /dev/null
+++ b/drivers/event/meson.build
@@ -0,0 +1,35 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+drivers = ['skeleton', 'sw']
+std_deps = ['eventdev', 'kvargs']
+config_flag_fmt = 'RTE_LIBRTE_@0@_EVENTDEV_PMD'
+driver_name_fmt = 'rte_pmd_@0@_event'
diff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build
new file mode 100644
index 000000000..bdc17d137
--- /dev/null
+++ b/drivers/event/skeleton/meson.build
@@ -0,0 +1,32 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+sources = files('skeleton_eventdev.c')
diff --git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build
new file mode 100644
index 000000000..bec19b99e
--- /dev/null
+++ b/drivers/event/sw/meson.build
@@ -0,0 +1,37 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+sources = files('sw_evdev_scheduler.c',
+ 'sw_evdev_worker.c',
+ 'sw_evdev_xstats.c',
+ 'sw_evdev.c'
+)
+deps += 'hash'
diff --git a/drivers/meson.build b/drivers/meson.build
index 3ea42b04b..00dc24efa 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -29,7 +29,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-driver_classes = ['crypto', 'mempool', 'net']
+driver_classes = ['crypto', 'event', 'mempool', 'net']
foreach class:driver_classes
drivers = []
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 5/8] net/bonding: add to meson build
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (3 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 4/8] event: add skeleton and sw eventdevs to meson build Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 6/8] examples: allow building examples as part of a " Bruce Richardson
` (3 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/bonding/meson.build | 39 +++++++++++++++++++++++++++++++++++++++
drivers/net/meson.build | 3 ++-
2 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/bonding/meson.build
diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build
new file mode 100644
index 000000000..465b9a07c
--- /dev/null
+++ b/drivers/net/bonding/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+name = 'bond' #, james bond :-)
+sources = files('rte_eth_bond_api.c', 'rte_eth_bond_pmd.c',
+ 'rte_eth_bond_args.c', 'rte_eth_bond_8023ad.c', 'rte_eth_bond_alb.c')
+
+deps += 'sched' # needed for rte_bitmap.h
+deps += ['compat', 'ip_frag', 'cmdline']
+
+install_headers('rte_eth_bond.h', 'rte_eth_bond_8023ad.h')
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index d07b38b19..d4d50396f 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -29,7 +29,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-drivers = ['af_packet', 'e1000', 'fm10k', 'i40e', 'ixgbe',
+drivers = ['af_packet', 'bonding',
+ 'e1000', 'fm10k', 'i40e', 'ixgbe',
'null', 'pcap', 'ring']
std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
config_flag_fmt = 'RTE_LIBRTE_@0@_PMD'
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 6/8] examples: allow building examples as part of a meson build
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (4 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 5/8] net/bonding: add " Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 7/8] examples: put app name and sources at top of makefiles Bruce Richardson
` (2 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Add support for having selected example apps built as part of a meson,
ninja build. By default none are built, and those to be built should be
named directly in the -Dexamples='' meson configuration argument.
This is useful for developers working on a feature who want to use a
suitable example, or examples, to test that feature, as they can
compile everything up in one go, and run the example without having
to do a ninja install first.
This commit adds examples which don't consist of multiple apps in
subdirectories to the meson build, so they can be built by default by passing
-Dexamples parameter to meson.
Not included are the following examples:
* ethtool
* multi-process
* netmap_compat
* performance-thread
* quota_watermark
* server_node_efd
* vm_power_manager
To test the apps added here, use the following command, merged to one line, to
add them to your meson build (command to be run inside the build directory):
meson configure -Dexamples=bond,cmdline,distributor,eventdev_pipeline_sw_pmd,\
exception_path,helloworld,ip_fragmentation,ip_pipeline,ip_reassembly,\
ipsec-secgw,ipv4_multicast,kni,l2fwd-cat,l2fwd-crypto,l2fwd-jobstats,\
l2fwd-keepalive,l2fwd,l3fwd-acl,l3fwd-power,l3fwd-vf,l3fwd,\
link_status_interrupt,load_balancer,packet_ordering,ptpclient,\
qos_meter,qos_sched,rxtx_callbacks,skeleton,tep_termination,\
timer,vhost,vhost_scsi,vmdq,vmdq_dcb
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/bond/meson.build | 40 +++++++++++++++++
examples/cmdline/meson.build | 39 +++++++++++++++++
examples/distributor/meson.build | 40 +++++++++++++++++
examples/eventdev_pipeline_sw_pmd/meson.build | 40 +++++++++++++++++
examples/exception_path/meson.build | 39 +++++++++++++++++
examples/helloworld/meson.build | 39 +++++++++++++++++
examples/ip_fragmentation/meson.build | 40 +++++++++++++++++
examples/ip_pipeline/meson.build | 63 +++++++++++++++++++++++++++
examples/ip_reassembly/meson.build | 40 +++++++++++++++++
examples/ipsec-secgw/meson.build | 41 +++++++++++++++++
examples/ipv4_multicast/meson.build | 40 +++++++++++++++++
examples/kni/meson.build | 40 +++++++++++++++++
examples/l2fwd-cat/meson.build | 42 ++++++++++++++++++
examples/l2fwd-crypto/meson.build | 40 +++++++++++++++++
examples/l2fwd-jobstats/meson.build | 40 +++++++++++++++++
examples/l2fwd-keepalive/meson.build | 40 +++++++++++++++++
examples/l2fwd/meson.build | 39 +++++++++++++++++
examples/l3fwd-acl/meson.build | 40 +++++++++++++++++
examples/l3fwd-power/meson.build | 40 +++++++++++++++++
examples/l3fwd-vf/meson.build | 40 +++++++++++++++++
examples/l3fwd/meson.build | 40 +++++++++++++++++
examples/link_status_interrupt/meson.build | 39 +++++++++++++++++
examples/load_balancer/meson.build | 40 +++++++++++++++++
examples/meson.build | 59 +++++++++++++++++++++++++
examples/packet_ordering/meson.build | 40 +++++++++++++++++
examples/ptpclient/meson.build | 39 +++++++++++++++++
examples/qos_meter/meson.build | 40 +++++++++++++++++
examples/qos_sched/meson.build | 41 +++++++++++++++++
examples/rxtx_callbacks/meson.build | 39 +++++++++++++++++
examples/skeleton/meson.build | 39 +++++++++++++++++
examples/tep_termination/meson.build | 40 +++++++++++++++++
examples/timer/meson.build | 40 +++++++++++++++++
examples/vhost/meson.build | 40 +++++++++++++++++
examples/vhost_scsi/meson.build | 41 +++++++++++++++++
examples/vmdq/meson.build | 39 +++++++++++++++++
examples/vmdq_dcb/meson.build | 39 +++++++++++++++++
meson.build | 5 +++
meson_options.txt | 2 +
38 files changed, 1484 insertions(+)
create mode 100644 examples/bond/meson.build
create mode 100644 examples/cmdline/meson.build
create mode 100644 examples/distributor/meson.build
create mode 100644 examples/eventdev_pipeline_sw_pmd/meson.build
create mode 100644 examples/exception_path/meson.build
create mode 100644 examples/helloworld/meson.build
create mode 100644 examples/ip_fragmentation/meson.build
create mode 100644 examples/ip_pipeline/meson.build
create mode 100644 examples/ip_reassembly/meson.build
create mode 100644 examples/ipsec-secgw/meson.build
create mode 100644 examples/ipv4_multicast/meson.build
create mode 100644 examples/kni/meson.build
create mode 100644 examples/l2fwd-cat/meson.build
create mode 100644 examples/l2fwd-crypto/meson.build
create mode 100644 examples/l2fwd-jobstats/meson.build
create mode 100644 examples/l2fwd-keepalive/meson.build
create mode 100644 examples/l2fwd/meson.build
create mode 100644 examples/l3fwd-acl/meson.build
create mode 100644 examples/l3fwd-power/meson.build
create mode 100644 examples/l3fwd-vf/meson.build
create mode 100644 examples/l3fwd/meson.build
create mode 100644 examples/link_status_interrupt/meson.build
create mode 100644 examples/load_balancer/meson.build
create mode 100644 examples/meson.build
create mode 100644 examples/packet_ordering/meson.build
create mode 100644 examples/ptpclient/meson.build
create mode 100644 examples/qos_meter/meson.build
create mode 100644 examples/qos_sched/meson.build
create mode 100644 examples/rxtx_callbacks/meson.build
create mode 100644 examples/skeleton/meson.build
create mode 100644 examples/tep_termination/meson.build
create mode 100644 examples/timer/meson.build
create mode 100644 examples/vhost/meson.build
create mode 100644 examples/vhost_scsi/meson.build
create mode 100644 examples/vmdq/meson.build
create mode 100644 examples/vmdq_dcb/meson.build
diff --git a/examples/bond/meson.build b/examples/bond/meson.build
new file mode 100644
index 000000000..5158a4535
--- /dev/null
+++ b/examples/bond/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'pmd_bond'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/cmdline/meson.build b/examples/cmdline/meson.build
new file mode 100644
index 000000000..ef373eaf0
--- /dev/null
+++ b/examples/cmdline/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'commands.c', 'main.c', 'parse_obj_list.c'
+)
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
new file mode 100644
index 000000000..611c8b3a7
--- /dev/null
+++ b/examples/distributor/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'distributor'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/eventdev_pipeline_sw_pmd/meson.build b/examples/eventdev_pipeline_sw_pmd/meson.build
new file mode 100644
index 000000000..17fcdd26d
--- /dev/null
+++ b/examples/eventdev_pipeline_sw_pmd/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'eventdev'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/exception_path/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/helloworld/meson.build b/examples/helloworld/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/helloworld/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/ip_fragmentation/meson.build b/examples/ip_fragmentation/meson.build
new file mode 100644
index 000000000..41a4931c5
--- /dev/null
+++ b/examples/ip_fragmentation/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['ip_frag', 'lpm']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/ip_pipeline/meson.build b/examples/ip_pipeline/meson.build
new file mode 100644
index 000000000..901a8a838
--- /dev/null
+++ b/examples/ip_pipeline/meson.build
@@ -0,0 +1,63 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['cfgfile', 'pipeline']
+includes += include_directories('pipeline')
+sources = files(
+ 'config_check.c',
+ 'config_parse.c',
+ 'config_parse_tm.c',
+ 'cpu_core_map.c',
+ 'init.c',
+ 'main.c',
+ 'parser.c',
+ 'thread.c',
+ 'thread_fe.c',
+ 'pipeline/pipeline_common_be.c',
+ 'pipeline/pipeline_common_fe.c',
+ 'pipeline/pipeline_firewall_be.c',
+ 'pipeline/pipeline_firewall.c',
+ 'pipeline/pipeline_flow_actions_be.c',
+ 'pipeline/pipeline_flow_actions.c',
+ 'pipeline/pipeline_flow_classification_be.c',
+ 'pipeline/pipeline_flow_classification.c',
+ 'pipeline/pipeline_master_be.c',
+ 'pipeline/pipeline_master.c',
+ 'pipeline/pipeline_passthrough_be.c',
+ 'pipeline/pipeline_passthrough.c',
+ 'pipeline/pipeline_routing_be.c',
+ 'pipeline/pipeline_routing.c',
+)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
new file mode 100644
index 000000000..1d9b600d9
--- /dev/null
+++ b/examples/ip_reassembly/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['lpm', 'ip_frag']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/ipsec-secgw/meson.build b/examples/ipsec-secgw/meson.build
new file mode 100644
index 000000000..ecd08d8d1
--- /dev/null
+++ b/examples/ipsec-secgw/meson.build
@@ -0,0 +1,41 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['cryptodev', 'lpm', 'acl', 'hash']
+sources = files(
+ 'esp.c', 'ipsec.c', 'ipsec-secgw.c', 'parser.c',
+ 'rt.c', 'sa.c', 'sp4.c', 'sp6.c'
+)
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
new file mode 100644
index 000000000..b8bca3903
--- /dev/null
+++ b/examples/ipv4_multicast/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'hash'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/kni/meson.build b/examples/kni/meson.build
new file mode 100644
index 000000000..34cd4fbf7
--- /dev/null
+++ b/examples/kni/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'kni'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
new file mode 100644
index 000000000..5d991fe02
--- /dev/null
+++ b/examples/l2fwd-cat/meson.build
@@ -0,0 +1,42 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+ext_deps += cc.find_library('pqos')
+cflags += '-D_GNU_SOURCE'
+cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+sources = files(
+ 'cat.c', 'l2fwd-cat.c'
+)
diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-crypto/meson.build
new file mode 100644
index 000000000..694957cb7
--- /dev/null
+++ b/examples/l2fwd-crypto/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'cryptodev'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
new file mode 100644
index 000000000..b816461b4
--- /dev/null
+++ b/examples/l2fwd-jobstats/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['jobstats', 'timer']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
new file mode 100644
index 000000000..48683a6d6
--- /dev/null
+++ b/examples/l2fwd-keepalive/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'timer'
+sources = files(
+ 'main.c', 'shm.c'
+)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/l2fwd/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
new file mode 100644
index 000000000..1ef5d7d2e
--- /dev/null
+++ b/examples/l3fwd-acl/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['acl', 'lpm', 'hash']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l3fwd-power/meson.build b/examples/l3fwd-power/meson.build
new file mode 100644
index 000000000..c02dc3c16
--- /dev/null
+++ b/examples/l3fwd-power/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['power', 'timer', 'lpm', 'hash']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
new file mode 100644
index 000000000..df4ed8a73
--- /dev/null
+++ b/examples/l3fwd-vf/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['lpm', 'hash']
+sources = files(
+ 'main.c'
+)
diff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build
new file mode 100644
index 000000000..a97436c58
--- /dev/null
+++ b/examples/l3fwd/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['hash', 'lpm']
+sources = files(
+ 'l3fwd_em.c', 'l3fwd_lpm.c', 'main.c'
+)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/link_status_interrupt/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
new file mode 100644
index 000000000..0be6a7dda
--- /dev/null
+++ b/examples/load_balancer/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'lpm'
+sources = files(
+ 'config.c', 'init.c', 'main.c', 'runtime.c'
+)
diff --git a/examples/meson.build b/examples/meson.build
new file mode 100644
index 000000000..a3f82529a
--- /dev/null
+++ b/examples/meson.build
@@ -0,0 +1,59 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+default_ext_deps = [cc.find_library('rt'),
+ cc.find_library('m'),
+ cc.find_library('dl')]
+
+driver_libs = []
+if get_option('default_library') == 'static'
+ driver_libs = dpdk_drivers
+endif
+
+foreach example: get_option('examples').split(',')
+ name = example
+ sources = []
+ cflags = []
+ ext_deps = default_ext_deps
+ includes = [include_directories(example)]
+ deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
+ subdir(example)
+
+ dep_objs = ext_deps
+ foreach d:deps
+ dep_objs += [get_variable('dep_rte_' + d)]
+ endforeach
+ executable('dpdk-' + name, sources,
+ include_directories: includes,
+ link_whole: driver_libs,
+ c_args: cflags,
+ dependencies: dep_objs)
+endforeach
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
new file mode 100644
index 000000000..81b33ac1f
--- /dev/null
+++ b/examples/packet_ordering/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'reorder'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
new file mode 100644
index 000000000..e67fb8979
--- /dev/null
+++ b/examples/ptpclient/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'ptpclient.c'
+)
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
new file mode 100644
index 000000000..e1e8cc51c
--- /dev/null
+++ b/examples/qos_meter/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'meter'
+sources = files(
+ 'main.c', 'rte_policer.c'
+)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
new file mode 100644
index 000000000..54053dc58
--- /dev/null
+++ b/examples/qos_sched/meson.build
@@ -0,0 +1,41 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['sched', 'cfgfile']
+sources = files(
+ 'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
+ 'init.c', 'main.c', 'stats.c'
+)
diff --git a/examples/rxtx_callbacks/meson.build b/examples/rxtx_callbacks/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/rxtx_callbacks/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
new file mode 100644
index 000000000..d3ce94e87
--- /dev/null
+++ b/examples/skeleton/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'basicfwd.c'
+)
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
new file mode 100644
index 000000000..92e88f12c
--- /dev/null
+++ b/examples/tep_termination/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += ['hash', 'vhost']
+sources = files(
+ 'main.c', 'vxlan.c', 'vxlan_setup.c'
+)
diff --git a/examples/timer/meson.build b/examples/timer/meson.build
new file mode 100644
index 000000000..0e55b2165
--- /dev/null
+++ b/examples/timer/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'timer'
+sources = files(
+ 'main.c'
+)
diff --git a/examples/vhost/meson.build b/examples/vhost/meson.build
new file mode 100644
index 000000000..aa345ccd5
--- /dev/null
+++ b/examples/vhost/meson.build
@@ -0,0 +1,40 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'vhost'
+sources = files(
+ 'main.c', 'virtio_net.c'
+)
diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build
new file mode 100644
index 000000000..b06d7f289
--- /dev/null
+++ b/examples/vhost_scsi/meson.build
@@ -0,0 +1,41 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+deps += 'vhost'
+cflags += ['-D_GNU_SOURCE','-D_FILE_OFFSET_BITS=64']
+sources = files(
+ 'scsi.c', 'vhost_scsi.c'
+)
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/vmdq/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
new file mode 100644
index 000000000..e58fb8a74
--- /dev/null
+++ b/examples/vmdq_dcb/meson.build
@@ -0,0 +1,39 @@
+# BSD LICENSE
+#
+# Copyright(c) 2017 Intel Corporation.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+sources = files(
+ 'main.c'
+)
diff --git a/meson.build b/meson.build
index d6846ebb8..e3d40ac38 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,11 @@ subdir('drivers')
subdir('usertools')
subdir('app')
+# build any examples explicitly requested - useful for developers
+if get_option('examples') != ''
+ subdir('examples')
+endif
+
# write the build config
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,
diff --git a/meson_options.txt b/meson_options.txt
index 29b548f5a..f2558feca 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,8 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,
description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly')
option('enable_kmods', type: 'boolean', value: true,
description: 'build kernel modules')
+option('examples', type: 'string', value: '',
+ description: 'Comma-separated list of examples to build by default')
option('include_subdir_arch', type: 'string', value: '',
description: 'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '',
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 7/8] examples: put app name and sources at top of makefiles
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (5 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 6/8] examples: allow building examples as part of a " Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 8/8] examples: use pkg-config info when building examples Bruce Richardson
2017-10-18 17:11 ` [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Luca Boccassi
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Reorder the text in the makefiles, so that the app name and the source
files are listed first. This then will allow them to be shared later in a
combined makefile building with pkg-config and RTE_SDK-based build system.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/bond/Makefile | 12 +++---
examples/cmdline/Makefile | 6 +++
examples/distributor/Makefile | 12 +++---
examples/eventdev_pipeline_sw_pmd/Makefile | 12 +++---
examples/exception_path/Makefile | 12 +++---
examples/helloworld/Makefile | 12 +++---
examples/ip_fragmentation/Makefile | 12 +++---
examples/ip_pipeline/Makefile | 62 +++++++++++++++---------------
examples/ip_reassembly/Makefile | 12 +++---
examples/ipsec-secgw/Makefile | 28 +++++++-------
examples/ipv4_multicast/Makefile | 12 +++---
examples/kni/Makefile | 12 +++---
examples/l2fwd-cat/Makefile | 12 +++---
examples/l2fwd-crypto/Makefile | 12 +++---
examples/l2fwd-jobstats/Makefile | 12 +++---
examples/l2fwd-keepalive/Makefile | 12 +++---
examples/l2fwd/Makefile | 12 +++---
examples/l3fwd-acl/Makefile | 12 +++---
examples/l3fwd-power/Makefile | 12 +++---
examples/l3fwd-vf/Makefile | 12 +++---
examples/l3fwd/Makefile | 12 +++---
examples/link_status_interrupt/Makefile | 12 +++---
examples/load_balancer/Makefile | 12 +++---
examples/multi_process/l2fwd_fork/Makefile | 12 +++---
examples/packet_ordering/Makefile | 12 +++---
examples/ptpclient/Makefile | 12 +++---
examples/qos_meter/Makefile | 12 +++---
examples/qos_sched/Makefile | 12 +++---
examples/rxtx_callbacks/Makefile | 12 +++---
examples/skeleton/Makefile | 12 +++---
examples/tep_termination/Makefile | 12 +++---
examples/timer/Makefile | 12 +++---
examples/vhost/Makefile | 12 +++---
examples/vhost_scsi/Makefile | 12 +++---
examples/vm_power_manager/Makefile | 14 +++----
examples/vmdq/Makefile | 12 +++---
examples/vmdq_dcb/Makefile | 12 +++---
37 files changed, 257 insertions(+), 249 deletions(-)
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index ae4cb6e12..5e7927489 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = bond_app
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = bond_app
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index 5155a6c80..118082e04 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = cmdline
+
+# all source are stored in SRCS-y
+SRCS-y := main.c commands.c parse_obj_list.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index 404993ebf..e800446ae 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = distributor_app
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = distributor_app
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
diff --git a/examples/eventdev_pipeline_sw_pmd/Makefile b/examples/eventdev_pipeline_sw_pmd/Makefile
index de4e22c88..eac984734 100644
--- a/examples/eventdev_pipeline_sw_pmd/Makefile
+++ b/examples/eventdev_pipeline_sw_pmd/Makefile
@@ -28,6 +28,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = eventdev_pipeline_sw_pmd
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -37,12 +43,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = eventdev_pipeline_sw_pmd
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index d16f74f6f..010cc82e7 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = exception_path
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = exception_path
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index c83ec01e8..53bb9620f 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = helloworld
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = helloworld
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index 4bc01abb9..b6f63e7be 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -30,6 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+# binary name
+APP = ip_fragmentation
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -39,12 +45,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = ip_fragmentation
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 12ce0a1d5..05137eb14 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -29,6 +29,37 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = ip_pipeline
+
+VPATH += $(SRCDIR)/pipeline
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+SRCS-y += config_parse.c
+SRCS-y += parser.c
+SRCS-y += config_parse_tm.c
+SRCS-y += config_check.c
+SRCS-y += init.c
+SRCS-y += thread.c
+SRCS-y += thread_fe.c
+SRCS-y += cpu_core_map.c
+
+SRCS-y += pipeline_common_be.c
+SRCS-y += pipeline_common_fe.c
+SRCS-y += pipeline_master_be.c
+SRCS-y += pipeline_master.c
+SRCS-y += pipeline_passthrough_be.c
+SRCS-y += pipeline_passthrough.c
+SRCS-y += pipeline_firewall_be.c
+SRCS-y += pipeline_firewall.c
+SRCS-y += pipeline_flow_classification_be.c
+SRCS-y += pipeline_flow_classification.c
+SRCS-y += pipeline_flow_actions_be.c
+SRCS-y += pipeline_flow_actions.c
+SRCS-y += pipeline_routing_be.c
+SRCS-y += pipeline_routing.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,38 +69,9 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = ip_pipeline
-
-VPATH += $(SRCDIR)/pipeline
-
INC += $(sort $(wildcard *.h)) $(sort $(wildcard pipeline/*.h))
-# all source are stored in SRCS-y
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := main.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += parser.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse_tm.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_check.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += init.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += thread.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += thread_fe.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += cpu_core_map.c
-
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_common_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_common_fe.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_master_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_master.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_passthrough_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_passthrough.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_firewall.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_classification.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_flow_actions.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing_be.c
-SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_routing.c
+SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y)
CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/pipeline
CFLAGS += -O3
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 85c64a38b..c17055b5f 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -30,6 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+# binary name
+APP = ip_reassembly
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -39,12 +45,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = ip_reassembly
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index 17e915510..e115ca56e 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -29,6 +29,20 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+APP = ipsec-secgw
+
+#
+# all source are stored in SRCS-y
+#
+SRCS-y += parser.c
+SRCS-y += ipsec.c
+SRCS-y += esp.c
+SRCS-y += sp4.c
+SRCS-y += sp6.c
+SRCS-y += sa.c
+SRCS-y += rt.c
+SRCS-y += ipsec-secgw.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,8 +52,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-APP = ipsec-secgw
-
CFLAGS += -O3 -gdwarf-2
CFLAGS += $(WERROR_FLAGS)
ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
@@ -50,16 +62,4 @@ ifeq ($(DEBUG),1)
CFLAGS += -DIPSEC_DEBUG -fstack-protector-all -O0
endif
-#
-# all source are stored in SRCS-y
-#
-SRCS-y += parser.c
-SRCS-y += ipsec.c
-SRCS-y += esp.c
-SRCS-y += sp4.c
-SRCS-y += sp6.c
-SRCS-y += sa.c
-SRCS-y += rt.c
-SRCS-y += ipsec-secgw.c
-
include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 1f7c53af3..28a3a619e 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -30,6 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+# binary name
+APP = ipv4_multicast
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -39,12 +45,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = ipv4_multicast
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 08a4f0c57..89304ade5 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = kni
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -43,12 +49,6 @@ $(error This application can only operate in a linuxapp environment, \
please change the definition of the RTE_TARGET environment variable)
endif
-# binary name
-APP = kni
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index a7fe6d68e..66bc00f92 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd-cat
+
+# all source are stored in SRCS-y
+SRCS-y := l2fwd-cat.c cat.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -42,12 +48,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd-cat
-
-# all source are stored in SRCS-y
-SRCS-y := l2fwd-cat.c cat.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index e8224caee..49cffe965 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd-crypto
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd-crypto
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index ab089f661..d905ef86f 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd-jobstats
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd-jobstats
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index ca45a798d..a58a710cd 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd-keepalive
+
+# all source are stored in SRCS-y
+SRCS-y := main.c shm.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd-keepalive
-
-# all source are stored in SRCS-y
-SRCS-y := main.c shm.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDFLAGS += -lrt
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 8896ab452..52f852f23 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index 3cd299f1b..aa1423211 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l3fwd-acl
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l3fwd-acl
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index 9c4f44300..d68b413f8 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l3fwd-power
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -44,12 +50,6 @@ please change the definition of the RTE_TARGET environment variable)
all:
else
-# binary name
-APP = l3fwd-power
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 989faf032..f95651945 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l3fwd-vf
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l3fwd-vf
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3 $(USER_FLAGS)
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index d99a43ade..0ae1dc43b 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l3fwd
+
+# all source are stored in SRCS-y
+SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l3fwd
-
-# all source are stored in SRCS-y
-SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c
-
CFLAGS += -I$(SRCDIR)
CFLAGS += -O3 $(USER_FLAGS)
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index d5ee073a4..9607da6ad 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = link_status_interrupt
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = link_status_interrupt
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index f656e51ce..cff10e1b6 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = load_balancer
+
+# all source are stored in SRCS-y
+SRCS-y := main.c config.c init.c runtime.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = load_balancer
-
-# all source are stored in SRCS-y
-SRCS-y := main.c config.c init.c runtime.c
-
CFLAGS += -O3 -g
CFLAGS += $(WERROR_FLAGS)
CFLAGS_config.o := -D_GNU_SOURCE
diff --git a/examples/multi_process/l2fwd_fork/Makefile b/examples/multi_process/l2fwd_fork/Makefile
index 11ae8ff42..a703ed37f 100644
--- a/examples/multi_process/l2fwd_fork/Makefile
+++ b/examples/multi_process/l2fwd_fork/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = l2fwd-fork
+
+# all source are stored in SRCS-y
+SRCS-y := main.c flib.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = l2fwd_fork
-
-# all source are stored in SRCS-y
-SRCS-y := main.c flib.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index de066c4cc..19fe743a7 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = packet_ordering
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = packet_ordering
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index b77cf7100..4cbb9528e 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = ptpclient
+
+# all source are stored in SRCS-y
+SRCS-y := ptpclient.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = ptpclient
-
-# all source are stored in SRCS-y
-SRCS-y := ptpclient.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index de1f12ce0..178835836 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = qos_meter
+
+# all source are stored in SRCS-y
+SRCS-y := main.c rte_policer.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = qos_meter
-
-# all source are stored in SRCS-y
-SRCS-y := main.c rte_policer.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index 56829c215..3cd5c229f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = qos_sched
+
+# all source are stored in SRCS-y
+SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -45,12 +51,6 @@ all:
clean:
else
-# binary name
-APP = qos_sched
-
-# all source are stored in SRCS-y
-SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
CFLAGS_args.o := -D_GNU_SOURCE
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index 0fafbb721..4bf72fbee 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = rxtx_callbacks
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = rxtx_callbacks
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 4a5d99f19..fc54c0a48 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = basicfwd
+
+# all source are stored in SRCS-y
+SRCS-y := basicfwd.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = basicfwd
-
-# all source are stored in SRCS-y
-SRCS-y := basicfwd.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 448e61832..9974e75fa 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = tep_termination
+
+# all source are stored in SRCS-y
+SRCS-y := main.c vxlan_setup.c vxlan.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -43,12 +49,6 @@ $(error This application can only operate in a linuxapp environment, \
please change the definition of the RTE_TARGET environment variable)
endif
-# binary name
-APP = tep_termination
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vxlan_setup.c vxlan.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -D_GNU_SOURCE
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index 7db48ec6b..e4bce3161 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = timer
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = timer
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index add9f27bb..5b743af03 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = vhost-switch
+
+# all source are stored in SRCS-y
+SRCS-y := main.c virtio_net.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -44,12 +50,6 @@ please change the definition of the RTE_TARGET environment variable)
all:
else
-# binary name
-APP = vhost-switch
-
-# all source are stored in SRCS-y
-SRCS-y := main.c virtio_net.c
-
CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -D_GNU_SOURCE
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index 0306a6ae2..1f3fd2a9a 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = vhost-scsi
+
+# all source are stored in SRCS-y
+SRCS-y := scsi.c vhost_scsi.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -44,12 +50,6 @@ please change the definition of the RTE_TARGET environment variable)
all:
else
-# binary name
-APP = vhost-scsi
-
-# all source are stored in SRCS-y
-SRCS-y := scsi.c vhost_scsi.c
-
CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -D_GNU_SOURCE
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 9cf20a289..bee0f5e41 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -29,6 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = vm_power_mgr
+
+# all source are stored in SRCS-y
+SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
+SRCS-y += channel_monitor.c
+
ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
$(error vm_power_manager requires libvirt >= 0.9.3)
else
@@ -42,13 +49,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = vm_power_mgr
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
-SRCS-y += channel_monitor.c
-
CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 501728222..7deaf4506 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = vmdq_app
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = vmdq_app
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += $(WERROR_FLAGS)
EXTRA_CFLAGS += -O3
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 0c200a980..554f6c0cb 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -29,6 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# binary name
+APP = vmdq_dcb_app
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -38,12 +44,6 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-# binary name
-APP = vmdq_dcb_app
-
-# all source are stored in SRCS-y
-SRCS-y := main.c
-
CFLAGS += $(WERROR_FLAGS)
# workaround for a gcc bug with noreturn attribute
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* [dpdk-dev] [PATCH 8/8] examples: use pkg-config info when building examples
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (6 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 7/8] examples: put app name and sources at top of makefiles Bruce Richardson
@ 2017-10-17 16:12 ` Bruce Richardson
2017-10-18 17:11 ` [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Luca Boccassi
8 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-17 16:12 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Change the example app Makefiles to query if DPDK is installed and
registered using pkg-config. If so, build directly using pkg-config info,
otherwise fall back to using the original build system with RTE_SDK and
RTE_TARGET
This commit changes the makefiles for the basic examples, i.e. those which
do not have multiple subdirectories underneath the main examples dir.
Examples not covered are:
* ethtool
* multi_process
* performance-thread
* quota_watermark
* netmap_compat
* server_node_efd
* vm_power_manager
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/bond/Makefile | 23 ++++++++++++++++++++
examples/cmdline/Makefile | 23 ++++++++++++++++++++
examples/distributor/Makefile | 23 ++++++++++++++++++++
examples/eventdev_pipeline_sw_pmd/Makefile | 23 ++++++++++++++++++++
examples/exception_path/Makefile | 23 ++++++++++++++++++++
examples/helloworld/Makefile | 23 ++++++++++++++++++++
examples/ip_fragmentation/Makefile | 23 ++++++++++++++++++++
examples/ip_pipeline/Makefile | 35 ++++++++++++++++++++++++++++--
examples/ip_reassembly/Makefile | 23 ++++++++++++++++++++
examples/ipsec-secgw/Makefile | 27 ++++++++++++++++++++++-
examples/ipv4_multicast/Makefile | 23 ++++++++++++++++++++
examples/kni/Makefile | 22 +++++++++++++++++++
examples/l2fwd-cat/Makefile | 25 +++++++++++++++++++++
examples/l2fwd-crypto/Makefile | 22 +++++++++++++++++++
examples/l2fwd-jobstats/Makefile | 22 +++++++++++++++++++
examples/l2fwd-keepalive/Makefile | 24 +++++++++++++++++++-
examples/l2fwd/Makefile | 22 +++++++++++++++++++
examples/l3fwd-acl/Makefile | 22 +++++++++++++++++++
examples/l3fwd-power/Makefile | 22 +++++++++++++++++++
examples/l3fwd-vf/Makefile | 22 +++++++++++++++++++
examples/l3fwd/Makefile | 22 +++++++++++++++++++
examples/link_status_interrupt/Makefile | 22 +++++++++++++++++++
examples/load_balancer/Makefile | 22 +++++++++++++++++++
examples/packet_ordering/Makefile | 22 +++++++++++++++++++
examples/ptpclient/Makefile | 22 +++++++++++++++++++
examples/qos_meter/Makefile | 22 +++++++++++++++++++
examples/qos_sched/Makefile | 22 +++++++++++++++++++
examples/rxtx_callbacks/Makefile | 22 +++++++++++++++++++
examples/skeleton/Makefile | 22 +++++++++++++++++++
examples/tep_termination/Makefile | 22 +++++++++++++++++++
examples/timer/Makefile | 22 +++++++++++++++++++
examples/vhost/Makefile | 22 +++++++++++++++++++
examples/vhost_scsi/Makefile | 27 +++++++++++++++++++++--
examples/vm_power_manager/Makefile | 14 ++++++------
examples/vmdq/Makefile | 22 +++++++++++++++++++
examples/vmdq_dcb/Makefile | 22 +++++++++++++++++++
36 files changed, 808 insertions(+), 13 deletions(-)
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 5e7927489..47e9adc77 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -35,6 +35,27 @@ APP = bond_app
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -59,3 +80,5 @@ LDLIBS += -lrte_pmd_bond
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index 118082e04..a9b61c508 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -35,6 +35,27 @@ APP = cmdline
# all source are stored in SRCS-y
SRCS-y := main.c commands.c parse_obj_list.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,5 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS_parse_obj_list.o := -D_GNU_SOURCE
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index e800446ae..96b250407 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -35,6 +35,27 @@ APP = distributor_app
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,5 @@ endif
EXTRA_CFLAGS += -O3 -Wfatal-errors
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/eventdev_pipeline_sw_pmd/Makefile b/examples/eventdev_pipeline_sw_pmd/Makefile
index eac984734..18fd35a55 100644
--- a/examples/eventdev_pipeline_sw_pmd/Makefile
+++ b/examples/eventdev_pipeline_sw_pmd/Makefile
@@ -34,6 +34,27 @@ APP = eventdev_pipeline_sw_pmd
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -47,3 +68,5 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 010cc82e7..60bcf63fa 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -35,6 +35,27 @@ APP = exception_path
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,5 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 53bb9620f..e5378f118 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -35,6 +35,27 @@ APP = helloworld
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,5 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index b6f63e7be..b879ed694 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -36,6 +36,27 @@ APP = ip_fragmentation
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,5 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 05137eb14..0d36ff223 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -32,8 +32,6 @@
# binary name
APP = ip_pipeline
-VPATH += $(SRCDIR)/pipeline
-
# all source are stored in SRCS-y
SRCS-y := main.c
SRCS-y += config_parse.c
@@ -60,10 +58,41 @@ SRCS-y += pipeline_flow_actions.c
SRCS-y += pipeline_routing_be.c
SRCS-y += pipeline_routing.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+VPATH += pipeline
+CFLAGS += -I. -I./pipeline/
+
+OBJS := $(patsubst %.c,build/%.o,$(SRCS-y))
+
+build/%.o: %.c Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) -c $< -o $@
+
+build/$(APP): $(OBJS)
+ $(CC) $(OBJS) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP) build/*.o
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
+VPATH += $(SRCDIR)/pipeline
+
# Default target, can be overridden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc
@@ -78,3 +107,5 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS) -Wno-error=unused-function -Wno-error=unused-variable
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index c17055b5f..f20f89744 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -36,6 +36,27 @@ APP = ip_reassembly
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,5 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index e115ca56e..0a14fc1e5 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -43,6 +43,29 @@ SRCS-y += sa.c
SRCS-y += rt.c
SRCS-y += ipsec-secgw.c
+CFLAGS += -gdwarf-2
+
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -52,7 +75,7 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
-CFLAGS += -O3 -gdwarf-2
+CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
CFLAGS_sa.o += -diag-disable=vec
@@ -63,3 +86,5 @@ CFLAGS += -DIPSEC_DEBUG -fstack-protector-all -O0
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 28a3a619e..5278c15ef 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -36,6 +36,27 @@ APP = ipv4_multicast
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,5 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+
+endif
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 89304ade5..63d57472c 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -35,6 +35,27 @@ APP = kni
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -53,3 +74,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index 66bc00f92..308a4e078 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -35,6 +35,30 @@ APP = l2fwd-cat
# all source are stored in SRCS-y
SRCS-y := l2fwd-cat.c cat.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+CFLAGS += -D_GNU_SOURCE
+LDFLAGS += -lpqos
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -65,3 +89,4 @@ LDLIBS += -L$(PQOS_INSTALL_PATH)
LDLIBS += -lpqos
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index 49cffe965..afa32b010 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -35,6 +35,27 @@ APP = l2fwd-crypto
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index d905ef86f..315daf691 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -35,6 +35,27 @@ APP = l2fwd-jobstats
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -49,3 +70,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index a58a710cd..a4daeeb04 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -34,6 +34,28 @@ APP = l2fwd-keepalive
# all source are stored in SRCS-y
SRCS-y := main.c shm.c
+LDFLAGS += -lrt
+
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
@@ -46,6 +68,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
-LDFLAGS += -lrt
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 52f852f23..55a67d636 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -35,6 +35,27 @@ APP = l2fwd
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index aa1423211..afd7421ff 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -35,6 +35,27 @@ APP = l3fwd-acl
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index d68b413f8..c17e66db3 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -35,6 +35,27 @@ APP = l3fwd-power
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -61,3 +82,4 @@ endif
include $(RTE_SDK)/mk/rte.extapp.mk
endif
+endif
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index f95651945..f3b324db0 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -35,6 +35,27 @@ APP = l3fwd-vf
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 0ae1dc43b..41abfe7f6 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -35,6 +35,27 @@ APP = l3fwd
# all source are stored in SRCS-y
SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -49,3 +70,4 @@ CFLAGS += -O3 $(USER_FLAGS)
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 9607da6ad..0e36eac0c 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -35,6 +35,27 @@ APP = link_status_interrupt
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index cff10e1b6..458e712de 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -35,6 +35,27 @@ APP = load_balancer
# all source are stored in SRCS-y
SRCS-y := main.c config.c init.c runtime.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 19fe743a7..a9b4eb016 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -35,6 +35,27 @@ APP = packet_ordering
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -48,3 +69,4 @@ CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 4cbb9528e..7ed57d9fc 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -35,6 +35,27 @@ APP = ptpclient
# all source are stored in SRCS-y
SRCS-y := ptpclient.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index 178835836..34879e105 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -35,6 +35,27 @@ APP = qos_meter
# all source are stored in SRCS-y
SRCS-y := main.c rte_policer.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index 3cd5c229f..f33c5b61d 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -35,6 +35,27 @@ APP = qos_sched
# all source are stored in SRCS-y
SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -59,3 +80,4 @@ CFLAGS_cfg_file.o := -D_GNU_SOURCE
include $(RTE_SDK)/mk/rte.extapp.mk
endif
+endif
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index 4bf72fbee..40989fdd5 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -35,6 +35,27 @@ APP = rxtx_callbacks
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,4 @@ endif
EXTRA_CFLAGS += -O3 -g -Wfatal-errors
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index fc54c0a48..ff13e7888 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -35,6 +35,27 @@ APP = basicfwd
# all source are stored in SRCS-y
SRCS-y := basicfwd.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -55,3 +76,4 @@ endif
EXTRA_CFLAGS += -O3 -g -Wfatal-errors
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 9974e75fa..52149a4b0 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -35,6 +35,27 @@ APP = tep_termination
# all source are stored in SRCS-y
SRCS-y := main.c vxlan_setup.c vxlan.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS += $(WERROR_FLAGS)
CFLAGS += -D_GNU_SOURCE
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index e4bce3161..dc1fb74ce 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -35,6 +35,27 @@ APP = timer
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -54,3 +75,4 @@ CFLAGS_main.o += -Wno-return-type
endif
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index 5b743af03..de0c8d872 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -35,6 +35,27 @@ APP = vhost-switch
# all source are stored in SRCS-y
SRCS-y := main.c virtio_net.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -57,3 +78,4 @@ CFLAGS += -D_GNU_SOURCE
include $(RTE_SDK)/mk/rte.extapp.mk
endif
+endif
diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile
index 1f3fd2a9a..29b654da6 100644
--- a/examples/vhost_scsi/Makefile
+++ b/examples/vhost_scsi/Makefile
@@ -35,6 +35,29 @@ APP = vhost-scsi
# all source are stored in SRCS-y
SRCS-y := scsi.c vhost_scsi.c
+CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -50,10 +73,10 @@ please change the definition of the RTE_TARGET environment variable)
all:
else
-CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
+CFLAGS += -O2
CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -D_GNU_SOURCE
include $(RTE_SDK)/mk/rte.extapp.mk
endif
+endif
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index bee0f5e41..9cf20a289 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -29,13 +29,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# binary name
-APP = vm_power_mgr
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
-SRCS-y += channel_monitor.c
-
ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
$(error vm_power_manager requires libvirt >= 0.9.3)
else
@@ -49,6 +42,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
+# binary name
+APP = vm_power_mgr
+
+# all source are stored in SRCS-y
+SRCS-y := main.c vm_power_cli.c power_manager.c channel_manager.c
+SRCS-y += channel_monitor.c
+
CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
CFLAGS += $(WERROR_FLAGS)
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 7deaf4506..bd2aae34c 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -35,6 +35,27 @@ APP = vmdq_app
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -49,3 +70,4 @@ CFLAGS += $(WERROR_FLAGS)
EXTRA_CFLAGS += -O3
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 554f6c0cb..d75498c45 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -35,6 +35,27 @@ APP = vmdq_dcb_app
# all source are stored in SRCS-y
SRCS-y := main.c
+# Build using pkg-config variables if possible
+$(shell pkg-config --exists libdpdk)
+ifeq ($(.SHELLSTATUS),0)
+
+PC_FILE := $(shell pkg-config --path libdpdk)
+CFLAGS += $(shell pkg-config --cflags libdpdk)
+LDFLAGS += $(shell pkg-config --libs libdpdk)
+
+build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
+ $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
+
+build:
+ @mkdir -p $@
+
+.PHONY: clean
+clean:
+ rm -f build/$(APP)
+ rmdir --ignore-fail-on-non-empty build
+
+else # Build using legacy build system
+
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
@@ -57,3 +78,4 @@ endif
EXTRA_CFLAGS += -O3 -g
include $(RTE_SDK)/mk/rte.extapp.mk
+endif
--
2.13.6
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-17 16:12 ` [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file Bruce Richardson
@ 2017-10-17 18:11 ` Luca Boccassi
2017-10-17 18:17 ` Luca Boccassi
0 siblings, 1 reply; 25+ messages in thread
From: Luca Boccassi @ 2017-10-17 18:11 UTC (permalink / raw)
To: Bruce Richardson, dev
On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> Since a number of libraries depend on the maths lib, as well as
> adding it
> to the project args, we also need to add it to the pkgconfig file
> args.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> config/meson.build | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/config/meson.build b/config/meson.build
> index db68a08d4..542fea4de 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> add_project_arguments('-march=@0@'.format(machine), language: 'c')
> # some libs depend on maths lib
> add_project_link_arguments('-lm', language: 'c')
> +dpdk_extra_ldflags += '-lm'
>
> # add -include rte_config to cflags
> add_project_arguments('-include', 'rte_config.h', language: 'c')
This is for static builds, right? If so it should go into the
Libs.private section of the .pc file, so that it's only used when
calling pkg-config --static --libs
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-17 18:11 ` Luca Boccassi
@ 2017-10-17 18:17 ` Luca Boccassi
2017-10-18 9:35 ` Bruce Richardson
0 siblings, 1 reply; 25+ messages in thread
From: Luca Boccassi @ 2017-10-17 18:17 UTC (permalink / raw)
To: Bruce Richardson, dev
On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > Since a number of libraries depend on the maths lib, as well as
> > adding it
> > to the project args, we also need to add it to the pkgconfig file
> > args.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > config/meson.build | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/config/meson.build b/config/meson.build
> > index db68a08d4..542fea4de 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > add_project_arguments('-march=@0@'.format(machine), language: 'c')
> > # some libs depend on maths lib
> > add_project_link_arguments('-lm', language: 'c')
> > +dpdk_extra_ldflags += '-lm'
> >
> > # add -include rte_config to cflags
> > add_project_arguments('-include', 'rte_config.h', language: 'c')
>
> This is for static builds, right? If so it should go into the
> Libs.private section of the .pc file, so that it's only used when
> calling pkg-config --static --libs
Bit of a brain fart - what I meant is, in order to have static builds
work out of the box with pkg-config --static, -lm (and any other
dependency used internally) could also be added to Libs.private in the
.pc
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-17 18:17 ` Luca Boccassi
@ 2017-10-18 9:35 ` Bruce Richardson
2017-10-18 9:51 ` Bruce Richardson
0 siblings, 1 reply; 25+ messages in thread
From: Bruce Richardson @ 2017-10-18 9:35 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev
On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > Since a number of libraries depend on the maths lib, as well as
> > > adding it
> > > to the project args, we also need to add it to the pkgconfig file
> > > args.
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > > config/meson.build | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/config/meson.build b/config/meson.build
> > > index db68a08d4..542fea4de 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > add_project_arguments('-march=@0@'.format(machine), language: 'c')
> > > # some libs depend on maths lib
> > > add_project_link_arguments('-lm', language: 'c')
> > > +dpdk_extra_ldflags += '-lm'
> > >
> > > # add -include rte_config to cflags
> > > add_project_arguments('-include', 'rte_config.h', language: 'c')
> >
> > This is for static builds, right? If so it should go into the
> > Libs.private section of the .pc file, so that it's only used when
> > calling pkg-config --static --libs
>
> Bit of a brain fart - what I meant is, in order to have static builds
> work out of the box with pkg-config --static, -lm (and any other
> dependency used internally) could also be added to Libs.private in the
> .pc
Does that not assume that both static and dynamic libs are installed
side-by-side? In DPDK case, we will either build static libs or shared
libs, but not both. If we require applications to use different
pkg-config commands depending on the type of DPDK build that was done,
it makes things awkward for the apps. Right now by putting all libs and
flags into the libs section of pkgconfig, and having the build system
track whether it's static or dynamic and therefore what is actually
necessary, we end up in a case where apps can be built against DPDK
irrespective of the actual build type done. For this particular -lm
flag, for instance, it only appears in the .pc file for static builds.
See the patches for the sample app Makefiles. Not sure how that can be
made to work if we use different pkg-config settings for different build
types.
Your input and suggestions here would be welcome.
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 9:35 ` Bruce Richardson
@ 2017-10-18 9:51 ` Bruce Richardson
2017-10-18 10:14 ` Luca Boccassi
2017-10-18 11:20 ` Thomas Monjalon
0 siblings, 2 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-18 9:51 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, thomas, olivier.matz, sergio.gonzalez.monroy
On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > Since a number of libraries depend on the maths lib, as well as
> > > > adding it
> > > > to the project args, we also need to add it to the pkgconfig file
> > > > args.
> > > >
> > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > ---
> > > > config/meson.build | 1 +
> > > > 1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/config/meson.build b/config/meson.build
> > > > index db68a08d4..542fea4de 100644
> > > > --- a/config/meson.build
> > > > +++ b/config/meson.build
> > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > add_project_arguments('-march=@0@'.format(machine), language: 'c')
> > > > # some libs depend on maths lib
> > > > add_project_link_arguments('-lm', language: 'c')
> > > > +dpdk_extra_ldflags += '-lm'
> > > >
> > > > # add -include rte_config to cflags
> > > > add_project_arguments('-include', 'rte_config.h', language: 'c')
> > >
> > > This is for static builds, right? If so it should go into the
> > > Libs.private section of the .pc file, so that it's only used when
> > > calling pkg-config --static --libs
> >
> > Bit of a brain fart - what I meant is, in order to have static builds
> > work out of the box with pkg-config --static, -lm (and any other
> > dependency used internally) could also be added to Libs.private in the
> > .pc
>
> Does that not assume that both static and dynamic libs are installed
> side-by-side? In DPDK case, we will either build static libs or shared
> libs, but not both. If we require applications to use different
> pkg-config commands depending on the type of DPDK build that was done,
> it makes things awkward for the apps. Right now by putting all libs and
> flags into the libs section of pkgconfig, and having the build system
> track whether it's static or dynamic and therefore what is actually
> necessary, we end up in a case where apps can be built against DPDK
> irrespective of the actual build type done. For this particular -lm
> flag, for instance, it only appears in the .pc file for static builds.
>
> See the patches for the sample app Makefiles. Not sure how that can be
> made to work if we use different pkg-config settings for different build
> types.
>
> Your input and suggestions here would be welcome.
>
+Thomas, Olivier, Sergio to get more input
Thinking about it some more, is there any reason why we can't or
shouldn't do both static and dynamic libs in all builds, and then let
apps use pkg-config to determine what they want to link against? It
wouldn't be a massive change to the new build system to do that, I
think.
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 9:51 ` Bruce Richardson
@ 2017-10-18 10:14 ` Luca Boccassi
2017-10-18 12:24 ` Bruce Richardson
2017-10-18 11:20 ` Thomas Monjalon
1 sibling, 1 reply; 25+ messages in thread
From: Luca Boccassi @ 2017-10-18 10:14 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, thomas, olivier.matz, sergio.gonzalez.monroy
On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > > Since a number of libraries depend on the maths lib, as well
> > > > > as
> > > > > adding it
> > > > > to the project args, we also need to add it to the pkgconfig
> > > > > file
> > > > > args.
> > > > >
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > ---
> > > > > config/meson.build | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > index db68a08d4..542fea4de 100644
> > > > > --- a/config/meson.build
> > > > > +++ b/config/meson.build
> > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > add_project_arguments('-march=@0@'.format(machine),
> > > > > language: 'c')
> > > > > # some libs depend on maths lib
> > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > +dpdk_extra_ldflags += '-lm'
> > > > >
> > > > > # add -include rte_config to cflags
> > > > > add_project_arguments('-include', 'rte_config.h', language:
> > > > > 'c')
> > > >
> > > > This is for static builds, right? If so it should go into the
> > > > Libs.private section of the .pc file, so that it's only used
> > > > when
> > > > calling pkg-config --static --libs
> > >
> > > Bit of a brain fart - what I meant is, in order to have static
> > > builds
> > > work out of the box with pkg-config --static, -lm (and any other
> > > dependency used internally) could also be added to Libs.private
> > > in the
> > > .pc
> >
> > Does that not assume that both static and dynamic libs are
> > installed
> > side-by-side? In DPDK case, we will either build static libs or
> > shared
> > libs, but not both. If we require applications to use different
> > pkg-config commands depending on the type of DPDK build that was
> > done,
> > it makes things awkward for the apps. Right now by putting all libs
> > and
> > flags into the libs section of pkgconfig, and having the build
> > system
> > track whether it's static or dynamic and therefore what is actually
> > necessary, we end up in a case where apps can be built against DPDK
> > irrespective of the actual build type done. For this particular -lm
> > flag, for instance, it only appears in the .pc file for static
> > builds.
> >
> > See the patches for the sample app Makefiles. Not sure how that can
> > be
> > made to work if we use different pkg-config settings for different
> > build
> > types.
> >
> > Your input and suggestions here would be welcome.
Yes that works nicely when the libraries are rebuilt locally - then it
can be chosen whether to build the static or dynamic ones.
In the packaging case though, at least in Debian and Ubuntu (not sure
about RHEL/SUSE), we do ship both static and dynamic libraries at the
same time, following best practices. So we'd have to choose and either
cause applications linking dynamically to over-link (which is what we
currently do in Debian/Ubuntu and many developers really don't like
that) or to cause applications that use the static libraries to have to
manually add the missing flags.
>From what I can see, the most common workflow for applications that
want to do static builds when using packaged libraries is to use the --
static flag of pkgconfig.
This has the advantage of being a ""standardised"" workflow, expected
to work across any dependency, not just DPDK. Of course that's not
always the case, but one can dream :-)
If you prefer to optimise for the local build workflow that's fine, we
can patch it in the distro, it's not too much overhead (I need to do it
anyway for the old build system at some point).
>
> +Thomas, Olivier, Sergio to get more input
>
> Thinking about it some more, is there any reason why we can't or
> shouldn't do both static and dynamic libs in all builds, and then let
> apps use pkg-config to determine what they want to link against? It
> wouldn't be a massive change to the new build system to do that, I
> think.
>
> /Bruce
Yes that would be ideal! Right now in Debian/Ubuntu we have to build
twice, doubling the required time unfortunately.
In theory the same objects could be packed into .ar and .so but sadly
Meson doesn't support that yet like autotools/cmake do:
https://github.com/mesonbuild/meson/issues/484
(please do add some feedback there as developers!)
It looks like it could be possible with some extensive hacking, not
sure if it would be worth it.
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 9:51 ` Bruce Richardson
2017-10-18 10:14 ` Luca Boccassi
@ 2017-10-18 11:20 ` Thomas Monjalon
2017-10-18 12:28 ` Bruce Richardson
1 sibling, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2017-10-18 11:20 UTC (permalink / raw)
To: Bruce Richardson, Luca Boccassi; +Cc: dev, olivier.matz, sergio.gonzalez.monroy
18/10/2017 11:51, Bruce Richardson:
> On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > > Since a number of libraries depend on the maths lib, as well as
> > > > > adding it
> > > > > to the project args, we also need to add it to the pkgconfig file
> > > > > args.
> > > > >
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > ---
> > > > > config/meson.build | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > index db68a08d4..542fea4de 100644
> > > > > --- a/config/meson.build
> > > > > +++ b/config/meson.build
> > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > add_project_arguments('-march=@0@'.format(machine), language: 'c')
> > > > > # some libs depend on maths lib
> > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > +dpdk_extra_ldflags += '-lm'
> > > > >
> > > > > # add -include rte_config to cflags
> > > > > add_project_arguments('-include', 'rte_config.h', language: 'c')
> > > >
> > > > This is for static builds, right? If so it should go into the
> > > > Libs.private section of the .pc file, so that it's only used when
> > > > calling pkg-config --static --libs
> > >
> > > Bit of a brain fart - what I meant is, in order to have static builds
> > > work out of the box with pkg-config --static, -lm (and any other
> > > dependency used internally) could also be added to Libs.private in the
> > > .pc
> >
> > Does that not assume that both static and dynamic libs are installed
> > side-by-side? In DPDK case, we will either build static libs or shared
> > libs, but not both. If we require applications to use different
> > pkg-config commands depending on the type of DPDK build that was done,
> > it makes things awkward for the apps. Right now by putting all libs and
> > flags into the libs section of pkgconfig, and having the build system
> > track whether it's static or dynamic and therefore what is actually
> > necessary, we end up in a case where apps can be built against DPDK
> > irrespective of the actual build type done. For this particular -lm
> > flag, for instance, it only appears in the .pc file for static builds.
> >
> > See the patches for the sample app Makefiles. Not sure how that can be
> > made to work if we use different pkg-config settings for different build
> > types.
> >
> > Your input and suggestions here would be welcome.
> >
>
> +Thomas, Olivier, Sergio to get more input
>
> Thinking about it some more, is there any reason why we can't or
> shouldn't do both static and dynamic libs in all builds, and then let
> apps use pkg-config to determine what they want to link against? It
> wouldn't be a massive change to the new build system to do that, I
> think.
Let's add a bit more complexity :)
It can be possible to link some libraries as static and others as dynamic.
One use case is to take advantage of the plugin packaging of PMDs
while trying to get more optimizations with static core libraries.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 10:14 ` Luca Boccassi
@ 2017-10-18 12:24 ` Bruce Richardson
2017-10-18 14:20 ` Bruce Richardson
0 siblings, 1 reply; 25+ messages in thread
From: Bruce Richardson @ 2017-10-18 12:24 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, thomas, olivier.matz, sergio.gonzalez.monroy
On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
> On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> > On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> > > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > > > Since a number of libraries depend on the maths lib, as well
> > > > > > as
> > > > > > adding it
> > > > > > to the project args, we also need to add it to the pkgconfig
> > > > > > file
> > > > > > args.
> > > > > >
> > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > ---
> > > > > > config/meson.build | 1 +
> > > > > > 1 file changed, 1 insertion(+)
> > > > > >
> > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > index db68a08d4..542fea4de 100644
> > > > > > --- a/config/meson.build
> > > > > > +++ b/config/meson.build
> > > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > > add_project_arguments('-march=@0@'.format(machine),
> > > > > > language: 'c')
> > > > > > # some libs depend on maths lib
> > > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > > +dpdk_extra_ldflags += '-lm'
> > > > > >
> > > > > > # add -include rte_config to cflags
> > > > > > add_project_arguments('-include', 'rte_config.h', language:
> > > > > > 'c')
> > > > >
> > > > > This is for static builds, right? If so it should go into the
> > > > > Libs.private section of the .pc file, so that it's only used
> > > > > when
> > > > > calling pkg-config --static --libs
> > > >
> > > > Bit of a brain fart - what I meant is, in order to have static
> > > > builds
> > > > work out of the box with pkg-config --static, -lm (and any other
> > > > dependency used internally) could also be added to Libs.private
> > > > in the
> > > > .pc
> > >
> > > Does that not assume that both static and dynamic libs are
> > > installed
> > > side-by-side? In DPDK case, we will either build static libs or
> > > shared
> > > libs, but not both. If we require applications to use different
> > > pkg-config commands depending on the type of DPDK build that was
> > > done,
> > > it makes things awkward for the apps. Right now by putting all libs
> > > and
> > > flags into the libs section of pkgconfig, and having the build
> > > system
> > > track whether it's static or dynamic and therefore what is actually
> > > necessary, we end up in a case where apps can be built against DPDK
> > > irrespective of the actual build type done. For this particular -lm
> > > flag, for instance, it only appears in the .pc file for static
> > > builds.
> > >
> > > See the patches for the sample app Makefiles. Not sure how that can
> > > be
> > > made to work if we use different pkg-config settings for different
> > > build
> > > types.
> > >
> > > Your input and suggestions here would be welcome.
>
> Yes that works nicely when the libraries are rebuilt locally - then it
> can be chosen whether to build the static or dynamic ones.
>
> In the packaging case though, at least in Debian and Ubuntu (not sure
> about RHEL/SUSE), we do ship both static and dynamic libraries at the
> same time, following best practices. So we'd have to choose and either
> cause applications linking dynamically to over-link (which is what we
> currently do in Debian/Ubuntu and many developers really don't like
> that) or to cause applications that use the static libraries to have to
> manually add the missing flags.
>
> From what I can see, the most common workflow for applications that
> want to do static builds when using packaged libraries is to use the --
> static flag of pkgconfig.
> This has the advantage of being a ""standardised"" workflow, expected
> to work across any dependency, not just DPDK. Of course that's not
> always the case, but one can dream :-)
>
> If you prefer to optimise for the local build workflow that's fine, we
> can patch it in the distro, it's not too much overhead (I need to do it
> anyway for the old build system at some point).
>
> >
> > +Thomas, Olivier, Sergio to get more input
> >
> > Thinking about it some more, is there any reason why we can't or
> > shouldn't do both static and dynamic libs in all builds, and then let
> > apps use pkg-config to determine what they want to link against? It
> > wouldn't be a massive change to the new build system to do that, I
> > think.
> >
> > /Bruce
>
> Yes that would be ideal! Right now in Debian/Ubuntu we have to build
> twice, doubling the required time unfortunately.
>
> In theory the same objects could be packed into .ar and .so but sadly
> Meson doesn't support that yet like autotools/cmake do:
>
> https://github.com/mesonbuild/meson/issues/484
>
> (please do add some feedback there as developers!)
>
> It looks like it could be possible with some extensive hacking, not
> sure if it would be worth it.
>
Actually, I think it's workable using extract_objects. Build the static
lib first, then extract_all_objects() and then use those to build the .so.
I can prototype it very easily by changing lib/meson.build and see what
happens.
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 11:20 ` Thomas Monjalon
@ 2017-10-18 12:28 ` Bruce Richardson
0 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-18 12:28 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Luca Boccassi, dev, olivier.matz, sergio.gonzalez.monroy
On Wed, Oct 18, 2017 at 01:20:11PM +0200, Thomas Monjalon wrote:
> 18/10/2017 11:51, Bruce Richardson:
> > On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> > > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > > > Since a number of libraries depend on the maths lib, as well as
> > > > > > adding it
> > > > > > to the project args, we also need to add it to the pkgconfig file
> > > > > > args.
> > > > > >
> > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > ---
> > > > > > config/meson.build | 1 +
> > > > > > 1 file changed, 1 insertion(+)
> > > > > >
> > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > index db68a08d4..542fea4de 100644
> > > > > > --- a/config/meson.build
> > > > > > +++ b/config/meson.build
> > > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > > add_project_arguments('-march=@0@'.format(machine), language: 'c')
> > > > > > # some libs depend on maths lib
> > > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > > +dpdk_extra_ldflags += '-lm'
> > > > > >
> > > > > > # add -include rte_config to cflags
> > > > > > add_project_arguments('-include', 'rte_config.h', language: 'c')
> > > > >
> > > > > This is for static builds, right? If so it should go into the
> > > > > Libs.private section of the .pc file, so that it's only used when
> > > > > calling pkg-config --static --libs
> > > >
> > > > Bit of a brain fart - what I meant is, in order to have static builds
> > > > work out of the box with pkg-config --static, -lm (and any other
> > > > dependency used internally) could also be added to Libs.private in the
> > > > .pc
> > >
> > > Does that not assume that both static and dynamic libs are installed
> > > side-by-side? In DPDK case, we will either build static libs or shared
> > > libs, but not both. If we require applications to use different
> > > pkg-config commands depending on the type of DPDK build that was done,
> > > it makes things awkward for the apps. Right now by putting all libs and
> > > flags into the libs section of pkgconfig, and having the build system
> > > track whether it's static or dynamic and therefore what is actually
> > > necessary, we end up in a case where apps can be built against DPDK
> > > irrespective of the actual build type done. For this particular -lm
> > > flag, for instance, it only appears in the .pc file for static builds.
> > >
> > > See the patches for the sample app Makefiles. Not sure how that can be
> > > made to work if we use different pkg-config settings for different build
> > > types.
> > >
> > > Your input and suggestions here would be welcome.
> > >
> >
> > +Thomas, Olivier, Sergio to get more input
> >
> > Thinking about it some more, is there any reason why we can't or
> > shouldn't do both static and dynamic libs in all builds, and then let
> > apps use pkg-config to determine what they want to link against? It
> > wouldn't be a massive change to the new build system to do that, I
> > think.
>
> Let's add a bit more complexity :)
>
> It can be possible to link some libraries as static and others as dynamic.
> One use case is to take advantage of the plugin packaging of PMDs
> while trying to get more optimizations with static core libraries.
>
Yep.
However, I would put that down under the "advanced usage" section of the
everything-you-wanted-to-know-about-DPDK-but-were-afraid-to-ask
(mythical) document. If we build both static and dynamic in all cases,
it makes it easy, via pkg-config options, to pick all of one or all of
the other. For those who want a mix, they can manage that themselves in
their build env - I see no compelling need to make that something we
need to support in the normal case.
I'll try and prototype building both in all cases, and see what the
result is like.
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 12:24 ` Bruce Richardson
@ 2017-10-18 14:20 ` Bruce Richardson
2017-10-18 15:28 ` Luca Boccassi
0 siblings, 1 reply; 25+ messages in thread
From: Bruce Richardson @ 2017-10-18 14:20 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, thomas, olivier.matz, sergio.gonzalez.monroy
On Wed, Oct 18, 2017 at 01:24:54PM +0100, Bruce Richardson wrote:
> On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
> > On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> > > On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson wrote:
> > > > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi wrote:
> > > > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > > > > > > Since a number of libraries depend on the maths lib, as well
> > > > > > > as
> > > > > > > adding it
> > > > > > > to the project args, we also need to add it to the pkgconfig
> > > > > > > file
> > > > > > > args.
> > > > > > >
> > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > > > ---
> > > > > > > config/meson.build | 1 +
> > > > > > > 1 file changed, 1 insertion(+)
> > > > > > >
> > > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > > index db68a08d4..542fea4de 100644
> > > > > > > --- a/config/meson.build
> > > > > > > +++ b/config/meson.build
> > > > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > > > add_project_arguments('-march=@0@'.format(machine),
> > > > > > > language: 'c')
> > > > > > > # some libs depend on maths lib
> > > > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > > > +dpdk_extra_ldflags += '-lm'
> > > > > > >
> > > > > > > # add -include rte_config to cflags
> > > > > > > add_project_arguments('-include', 'rte_config.h', language:
> > > > > > > 'c')
> > > > > >
> > > > > > This is for static builds, right? If so it should go into the
> > > > > > Libs.private section of the .pc file, so that it's only used
> > > > > > when
> > > > > > calling pkg-config --static --libs
> > > > >
> > > > > Bit of a brain fart - what I meant is, in order to have static
> > > > > builds
> > > > > work out of the box with pkg-config --static, -lm (and any other
> > > > > dependency used internally) could also be added to Libs.private
> > > > > in the
> > > > > .pc
> > > >
> > > > Does that not assume that both static and dynamic libs are
> > > > installed
> > > > side-by-side? In DPDK case, we will either build static libs or
> > > > shared
> > > > libs, but not both. If we require applications to use different
> > > > pkg-config commands depending on the type of DPDK build that was
> > > > done,
> > > > it makes things awkward for the apps. Right now by putting all libs
> > > > and
> > > > flags into the libs section of pkgconfig, and having the build
> > > > system
> > > > track whether it's static or dynamic and therefore what is actually
> > > > necessary, we end up in a case where apps can be built against DPDK
> > > > irrespective of the actual build type done. For this particular -lm
> > > > flag, for instance, it only appears in the .pc file for static
> > > > builds.
> > > >
> > > > See the patches for the sample app Makefiles. Not sure how that can
> > > > be
> > > > made to work if we use different pkg-config settings for different
> > > > build
> > > > types.
> > > >
> > > > Your input and suggestions here would be welcome.
> >
> > Yes that works nicely when the libraries are rebuilt locally - then it
> > can be chosen whether to build the static or dynamic ones.
> >
> > In the packaging case though, at least in Debian and Ubuntu (not sure
> > about RHEL/SUSE), we do ship both static and dynamic libraries at the
> > same time, following best practices. So we'd have to choose and either
> > cause applications linking dynamically to over-link (which is what we
> > currently do in Debian/Ubuntu and many developers really don't like
> > that) or to cause applications that use the static libraries to have to
> > manually add the missing flags.
> >
> > From what I can see, the most common workflow for applications that
> > want to do static builds when using packaged libraries is to use the --
> > static flag of pkgconfig.
> > This has the advantage of being a ""standardised"" workflow, expected
> > to work across any dependency, not just DPDK. Of course that's not
> > always the case, but one can dream :-)
> >
> > If you prefer to optimise for the local build workflow that's fine, we
> > can patch it in the distro, it's not too much overhead (I need to do it
> > anyway for the old build system at some point).
> >
> > >
> > > +Thomas, Olivier, Sergio to get more input
> > >
> > > Thinking about it some more, is there any reason why we can't or
> > > shouldn't do both static and dynamic libs in all builds, and then let
> > > apps use pkg-config to determine what they want to link against? It
> > > wouldn't be a massive change to the new build system to do that, I
> > > think.
> > >
> > > /Bruce
> >
> > Yes that would be ideal! Right now in Debian/Ubuntu we have to build
> > twice, doubling the required time unfortunately.
> >
> > In theory the same objects could be packed into .ar and .so but sadly
> > Meson doesn't support that yet like autotools/cmake do:
> >
> > https://github.com/mesonbuild/meson/issues/484
> >
> > (please do add some feedback there as developers!)
> >
> > It looks like it could be possible with some extensive hacking, not
> > sure if it would be worth it.
> >
> Actually, I think it's workable using extract_objects. Build the static
> lib first, then extract_all_objects() and then use those to build the .so.
> I can prototype it very easily by changing lib/meson.build and see what
> happens.
>
Seems to work fine. This change makes all the libraries (bar EAL, which
is special-cased) appear as both .a and .so. Testpmd links against the
dynamic versions and still works.
When I get the chance I'll see about doing the same for EAL and drivers,
and then having the pkgconfig file reflect both possibilities. Then I
can test with some examples linking both dynamically and statically and
check all is as expected.
/Bruce
diff --git a/lib/meson.build b/lib/meson.build
index f04cb2791..29c88548b 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,6 +76,20 @@ foreach l:libraries
dep_objs += [get_variable('dep_rte_' + d)]
endforeach
+ libname = 'rte_' + name
+
+# first build static library
+ static_lib = static_library(libname, sources,
+ objects: objs,
+ c_args: cflags,
+ dependencies: dep_objs,
+ include_directories: include_directories(dir_name),
+ install: true)
+
+# now use those objects to build dynamic library
+ sources = []
+ objs += static_lib.extract_all_objects()
+
if get_option('per_library_versions')
lib_version = '@0@.1'.format(version)
so_version = '@0@'.format(version)
@@ -87,8 +101,7 @@ foreach l:libraries
version_map = '@0@/@1@/rte_@2@_version.map'.format(
meson.current_source_dir(), dir_name, name)
- libname = 'rte_' + name
- lib = library(libname,
+ lib = shared_library(libname,
sources,
objects: objs,
c_args: cflags,
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 14:20 ` Bruce Richardson
@ 2017-10-18 15:28 ` Luca Boccassi
2017-10-18 19:13 ` Aaron Conole
0 siblings, 1 reply; 25+ messages in thread
From: Luca Boccassi @ 2017-10-18 15:28 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, thomas, olivier.matz, sergio.gonzalez.monroy
On Wed, 2017-10-18 at 15:20 +0100, Bruce Richardson wrote:
> On Wed, Oct 18, 2017 at 01:24:54PM +0100, Bruce Richardson wrote:
> > On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
> > > On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> > > > On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson
> > > > wrote:
> > > > > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi
> > > > > wrote:
> > > > > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
> > > > > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson
> > > > > > > wrote:
> > > > > > > > Since a number of libraries depend on the maths lib, as
> > > > > > > > well
> > > > > > > > as
> > > > > > > > adding it
> > > > > > > > to the project args, we also need to add it to the
> > > > > > > > pkgconfig
> > > > > > > > file
> > > > > > > > args.
> > > > > > > >
> > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel
> > > > > > > > .com>
> > > > > > > > ---
> > > > > > > > config/meson.build | 1 +
> > > > > > > > 1 file changed, 1 insertion(+)
> > > > > > > >
> > > > > > > > diff --git a/config/meson.build b/config/meson.build
> > > > > > > > index db68a08d4..542fea4de 100644
> > > > > > > > --- a/config/meson.build
> > > > > > > > +++ b/config/meson.build
> > > > > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
> > > > > > > > add_project_arguments('-march=@0@'.format(machine),
> > > > > > > > language: 'c')
> > > > > > > > # some libs depend on maths lib
> > > > > > > > add_project_link_arguments('-lm', language: 'c')
> > > > > > > > +dpdk_extra_ldflags += '-lm'
> > > > > > > >
> > > > > > > > # add -include rte_config to cflags
> > > > > > > > add_project_arguments('-include', 'rte_config.h',
> > > > > > > > language:
> > > > > > > > 'c')
> > > > > > >
> > > > > > > This is for static builds, right? If so it should go into
> > > > > > > the
> > > > > > > Libs.private section of the .pc file, so that it's only
> > > > > > > used
> > > > > > > when
> > > > > > > calling pkg-config --static --libs
> > > > > >
> > > > > > Bit of a brain fart - what I meant is, in order to have
> > > > > > static
> > > > > > builds
> > > > > > work out of the box with pkg-config --static, -lm (and any
> > > > > > other
> > > > > > dependency used internally) could also be added to
> > > > > > Libs.private
> > > > > > in the
> > > > > > .pc
> > > > >
> > > > > Does that not assume that both static and dynamic libs are
> > > > > installed
> > > > > side-by-side? In DPDK case, we will either build static libs
> > > > > or
> > > > > shared
> > > > > libs, but not both. If we require applications to use
> > > > > different
> > > > > pkg-config commands depending on the type of DPDK build that
> > > > > was
> > > > > done,
> > > > > it makes things awkward for the apps. Right now by putting
> > > > > all libs
> > > > > and
> > > > > flags into the libs section of pkgconfig, and having the
> > > > > build
> > > > > system
> > > > > track whether it's static or dynamic and therefore what is
> > > > > actually
> > > > > necessary, we end up in a case where apps can be built
> > > > > against DPDK
> > > > > irrespective of the actual build type done. For this
> > > > > particular -lm
> > > > > flag, for instance, it only appears in the .pc file for
> > > > > static
> > > > > builds.
> > > > >
> > > > > See the patches for the sample app Makefiles. Not sure how
> > > > > that can
> > > > > be
> > > > > made to work if we use different pkg-config settings for
> > > > > different
> > > > > build
> > > > > types.
> > > > >
> > > > > Your input and suggestions here would be welcome.
> > >
> > > Yes that works nicely when the libraries are rebuilt locally -
> > > then it
> > > can be chosen whether to build the static or dynamic ones.
> > >
> > > In the packaging case though, at least in Debian and Ubuntu (not
> > > sure
> > > about RHEL/SUSE), we do ship both static and dynamic libraries at
> > > the
> > > same time, following best practices. So we'd have to choose and
> > > either
> > > cause applications linking dynamically to over-link (which is
> > > what we
> > > currently do in Debian/Ubuntu and many developers really don't
> > > like
> > > that) or to cause applications that use the static libraries to
> > > have to
> > > manually add the missing flags.
> > >
> > > From what I can see, the most common workflow for applications
> > > that
> > > want to do static builds when using packaged libraries is to use
> > > the --
> > > static flag of pkgconfig.
> > > This has the advantage of being a ""standardised"" workflow,
> > > expected
> > > to work across any dependency, not just DPDK. Of course that's
> > > not
> > > always the case, but one can dream :-)
> > >
> > > If you prefer to optimise for the local build workflow that's
> > > fine, we
> > > can patch it in the distro, it's not too much overhead (I need to
> > > do it
> > > anyway for the old build system at some point).
> > >
> > > >
> > > > +Thomas, Olivier, Sergio to get more input
> > > >
> > > > Thinking about it some more, is there any reason why we can't
> > > > or
> > > > shouldn't do both static and dynamic libs in all builds, and
> > > > then let
> > > > apps use pkg-config to determine what they want to link
> > > > against? It
> > > > wouldn't be a massive change to the new build system to do
> > > > that, I
> > > > think.
> > > >
> > > > /Bruce
> > >
> > > Yes that would be ideal! Right now in Debian/Ubuntu we have to
> > > build
> > > twice, doubling the required time unfortunately.
> > >
> > > In theory the same objects could be packed into .ar and .so but
> > > sadly
> > > Meson doesn't support that yet like autotools/cmake do:
> > >
> > > https://github.com/mesonbuild/meson/issues/484
> > >
> > > (please do add some feedback there as developers!)
> > >
> > > It looks like it could be possible with some extensive hacking,
> > > not
> > > sure if it would be worth it.
> > >
> >
> > Actually, I think it's workable using extract_objects. Build the
> > static
> > lib first, then extract_all_objects() and then use those to build
> > the .so.
> > I can prototype it very easily by changing lib/meson.build and see
> > what
> > happens.
> >
>
> Seems to work fine. This change makes all the libraries (bar EAL,
> which
> is special-cased) appear as both .a and .so. Testpmd links against
> the
> dynamic versions and still works.
>
> When I get the chance I'll see about doing the same for EAL and
> drivers,
> and then having the pkgconfig file reflect both possibilities. Then I
> can test with some examples linking both dynamically and statically
> and
> check all is as expected.
>
> /Bruce
>
> diff --git a/lib/meson.build b/lib/meson.build
> index f04cb2791..29c88548b 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -76,6 +76,20 @@ foreach l:libraries
> dep_objs += [get_variable('dep_rte_' + d)]
> endforeach
>
> + libname = 'rte_' + name
> +
> +# first build static library
> + static_lib = static_library(libname, sources,
> + objects: objs,
> + c_args: cflags,
> + dependencies: dep_objs,
> + include_directories:
> include_directories(dir_name),
> + install: true)
> +
> +# now use those objects to build dynamic library
> + sources = []
> + objs += static_lib.extract_all_objects()
> +
> if get_option('per_library_versions')
> lib_version = '@0@.1'.format(version)
> so_version = '@0@'.format(version)
> @@ -87,8 +101,7 @@ foreach l:libraries
>
> version_map = '@0@/@1@/rte_@2@_version.map'.format(
> meson.current_source_dir(), dir_name,
> name)
> - libname = 'rte_' + name
> - lib = library(libname,
> + lib = shared_library(libname,
> sources,
> objects: objs,
> c_args: cflags,
Nice! Much easier than I thought reading that thread :-)
I'll try to give it a test run in the next few days. Thanks!
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 0/8] Support sample applications with new build system
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
` (7 preceding siblings ...)
2017-10-17 16:12 ` [dpdk-dev] [PATCH 8/8] examples: use pkg-config info when building examples Bruce Richardson
@ 2017-10-18 17:11 ` Luca Boccassi
2017-10-19 8:39 ` Bruce Richardson
2017-10-23 10:43 ` Bruce Richardson
8 siblings, 2 replies; 25+ messages in thread
From: Luca Boccassi @ 2017-10-18 17:11 UTC (permalink / raw)
To: Bruce Richardson, dev
On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> This patchset enables sample apps to be used with the new meson build
> system. The work is really three-fold:
>
> * fix issues and pre-requisites to get the sample apps compiling,
> such as
> ensuring that all needed PMDs are enabled, e.g. bond PMD for bond
> example
> * allow examples - one or more - to built as part of a regular build,
> so as
> to allow easier testing of feature X using its sample app
> * change the example app Makefiles so that when compiled as
> standalone
> entities they use the pkg-config information when available, and
> only the
> DPDK makefile system if pkgconfig info is not installed.
>
> Bruce Richardson (8):
> build: add maths library to libs in pkg-config file
> build: add detection and use of libnuma
> lpm: install vector header files
> event: add skeleton and sw eventdevs to meson build
> net/bonding: add to meson build
> examples: allow building examples as part of a meson build
> examples: put app name and sources at top of makefiles
> examples: use pkg-config info when building examples
>
> config/meson.build | 11 ++++
> drivers/event/meson.build | 35 ++++++++++
> drivers/event/skeleton/meson.build | 32 +++++++++
> drivers/event/sw/meson.build | 37 +++++++++++
> drivers/meson.build | 2 +-
> drivers/net/bonding/meson.build | 39 +++++++++++
> drivers/net/meson.build | 3 +-
> examples/bond/Makefile | 35 ++++++++--
> examples/bond/meson.build | 40 ++++++++++++
> examples/cmdline/Makefile | 29 +++++++++
> examples/cmdline/meson.build | 39 +++++++++++
> examples/distributor/Makefile | 35 ++++++++--
> examples/distributor/meson.build | 40 ++++++++++++
> examples/eventdev_pipeline_sw_pmd/Makefile | 35 ++++++++--
> examples/eventdev_pipeline_sw_pmd/meson.build | 40 ++++++++++++
> examples/exception_path/Makefile | 35 ++++++++--
> examples/exception_path/meson.build | 39 +++++++++++
> examples/helloworld/Makefile | 35 ++++++++--
> examples/helloworld/meson.build | 39 +++++++++++
> examples/ip_fragmentation/Makefile | 35 ++++++++--
> examples/ip_fragmentation/meson.build | 40 ++++++++++++
> examples/ip_pipeline/Makefile | 93
> ++++++++++++++++++---------
> examples/ip_pipeline/meson.build | 63
> ++++++++++++++++++
> examples/ip_reassembly/Makefile | 35 ++++++++--
> examples/ip_reassembly/meson.build | 40 ++++++++++++
> examples/ipsec-secgw/Makefile | 55 +++++++++++-----
> examples/ipsec-secgw/meson.build | 41 ++++++++++++
> examples/ipv4_multicast/Makefile | 35 ++++++++--
> examples/ipv4_multicast/meson.build | 40 ++++++++++++
> examples/kni/Makefile | 34 ++++++++--
> examples/kni/meson.build | 40 ++++++++++++
> examples/l2fwd-cat/Makefile | 37 +++++++++--
> examples/l2fwd-cat/meson.build | 42 ++++++++++++
> examples/l2fwd-crypto/Makefile | 34 ++++++++--
> examples/l2fwd-crypto/meson.build | 40 ++++++++++++
> examples/l2fwd-jobstats/Makefile | 34 ++++++++--
> examples/l2fwd-jobstats/meson.build | 40 ++++++++++++
> examples/l2fwd-keepalive/Makefile | 36 +++++++++--
> examples/l2fwd-keepalive/meson.build | 40 ++++++++++++
> examples/l2fwd/Makefile | 34 ++++++++--
> examples/l2fwd/meson.build | 39 +++++++++++
> examples/l3fwd-acl/Makefile | 34 ++++++++--
> examples/l3fwd-acl/meson.build | 40 ++++++++++++
> examples/l3fwd-power/Makefile | 34 ++++++++--
> examples/l3fwd-power/meson.build | 40 ++++++++++++
> examples/l3fwd-vf/Makefile | 34 ++++++++--
> examples/l3fwd-vf/meson.build | 40 ++++++++++++
> examples/l3fwd/Makefile | 34 ++++++++--
> examples/l3fwd/meson.build | 40 ++++++++++++
> examples/link_status_interrupt/Makefile | 34 ++++++++--
> examples/link_status_interrupt/meson.build | 39 +++++++++++
> examples/load_balancer/Makefile | 34 ++++++++--
> examples/load_balancer/meson.build | 40 ++++++++++++
> examples/meson.build | 59 +++++++++++++++++
> examples/multi_process/l2fwd_fork/Makefile | 12 ++--
> examples/packet_ordering/Makefile | 34 ++++++++--
> examples/packet_ordering/meson.build | 40 ++++++++++++
> examples/ptpclient/Makefile | 34 ++++++++--
> examples/ptpclient/meson.build | 39 +++++++++++
> examples/qos_meter/Makefile | 34 ++++++++--
> examples/qos_meter/meson.build | 40 ++++++++++++
> examples/qos_sched/Makefile | 34 ++++++++--
> examples/qos_sched/meson.build | 41 ++++++++++++
> examples/rxtx_callbacks/Makefile | 34 ++++++++--
> examples/rxtx_callbacks/meson.build | 39 +++++++++++
> examples/skeleton/Makefile | 34 ++++++++--
> examples/skeleton/meson.build | 39 +++++++++++
> examples/tep_termination/Makefile | 34 ++++++++--
> examples/tep_termination/meson.build | 40 ++++++++++++
> examples/timer/Makefile | 34 ++++++++--
> examples/timer/meson.build | 40 ++++++++++++
> examples/vhost/Makefile | 34 ++++++++--
> examples/vhost/meson.build | 40 ++++++++++++
> examples/vhost_scsi/Makefile | 39 ++++++++---
> examples/vhost_scsi/meson.build | 41 ++++++++++++
> examples/vmdq/Makefile | 34 ++++++++--
> examples/vmdq/meson.build | 39 +++++++++++
> examples/vmdq_dcb/Makefile | 34 ++++++++--
> examples/vmdq_dcb/meson.build | 39 +++++++++++
> lib/librte_eal/linuxapp/eal/meson.build | 3 +
> lib/librte_lpm/meson.build | 3 +
> lib/librte_vhost/meson.build | 3 +
> meson.build | 5 ++
> meson_options.txt | 2 +
> 84 files changed, 2699 insertions(+), 248 deletions(-)
> create mode 100644 drivers/event/meson.build
> create mode 100644 drivers/event/skeleton/meson.build
> create mode 100644 drivers/event/sw/meson.build
> create mode 100644 drivers/net/bonding/meson.build
> create mode 100644 examples/bond/meson.build
> create mode 100644 examples/cmdline/meson.build
> create mode 100644 examples/distributor/meson.build
> create mode 100644 examples/eventdev_pipeline_sw_pmd/meson.build
> create mode 100644 examples/exception_path/meson.build
> create mode 100644 examples/helloworld/meson.build
> create mode 100644 examples/ip_fragmentation/meson.build
> create mode 100644 examples/ip_pipeline/meson.build
> create mode 100644 examples/ip_reassembly/meson.build
> create mode 100644 examples/ipsec-secgw/meson.build
> create mode 100644 examples/ipv4_multicast/meson.build
> create mode 100644 examples/kni/meson.build
> create mode 100644 examples/l2fwd-cat/meson.build
> create mode 100644 examples/l2fwd-crypto/meson.build
> create mode 100644 examples/l2fwd-jobstats/meson.build
> create mode 100644 examples/l2fwd-keepalive/meson.build
> create mode 100644 examples/l2fwd/meson.build
> create mode 100644 examples/l3fwd-acl/meson.build
> create mode 100644 examples/l3fwd-power/meson.build
> create mode 100644 examples/l3fwd-vf/meson.build
> create mode 100644 examples/l3fwd/meson.build
> create mode 100644 examples/link_status_interrupt/meson.build
> create mode 100644 examples/load_balancer/meson.build
> create mode 100644 examples/meson.build
> create mode 100644 examples/packet_ordering/meson.build
> create mode 100644 examples/ptpclient/meson.build
> create mode 100644 examples/qos_meter/meson.build
> create mode 100644 examples/qos_sched/meson.build
> create mode 100644 examples/rxtx_callbacks/meson.build
> create mode 100644 examples/skeleton/meson.build
> create mode 100644 examples/tep_termination/meson.build
> create mode 100644 examples/timer/meson.build
> create mode 100644 examples/vhost/meson.build
> create mode 100644 examples/vhost_scsi/meson.build
> create mode 100644 examples/vmdq/meson.build
> create mode 100644 examples/vmdq_dcb/meson.build
Reviewed-by: Luca Boccassi <bluca@debian.org>
Forgot to write that regardless of what we can do with the static +
dynamic builds, the series looks good. Thanks!
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 15:28 ` Luca Boccassi
@ 2017-10-18 19:13 ` Aaron Conole
2017-10-18 19:21 ` Thomas Monjalon
0 siblings, 1 reply; 25+ messages in thread
From: Aaron Conole @ 2017-10-18 19:13 UTC (permalink / raw)
To: Luca Boccassi
Cc: Bruce Richardson, dev, thomas, olivier.matz, sergio.gonzalez.monroy
Luca Boccassi <bluca@debian.org> writes:
> On Wed, 2017-10-18 at 15:20 +0100, Bruce Richardson wrote:
>> On Wed, Oct 18, 2017 at 01:24:54PM +0100, Bruce Richardson wrote:
>> > On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
>> > > On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
>> > > > On Wed, Oct 18, 2017 at 10:35:48AM +0100, Bruce Richardson
>> > > > wrote:
>> > > > > On Tue, Oct 17, 2017 at 07:17:09PM +0100, Luca Boccassi
>> > > > > wrote:
>> > > > > > On Tue, 2017-10-17 at 19:11 +0100, Luca Boccassi wrote:
>> > > > > > > On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson
>> > > > > > > wrote:
>> > > > > > > > Since a number of libraries depend on the maths lib, as
>> > > > > > > > well
>> > > > > > > > as
>> > > > > > > > adding it
>> > > > > > > > to the project args, we also need to add it to the
>> > > > > > > > pkgconfig
>> > > > > > > > file
>> > > > > > > > args.
>> > > > > > > >
>> > > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel
>> > > > > > > > .com>
>> > > > > > > > ---
>> > > > > > > > config/meson.build | 1 +
>> > > > > > > > 1 file changed, 1 insertion(+)
>> > > > > > > >
>> > > > > > > > diff --git a/config/meson.build b/config/meson.build
>> > > > > > > > index db68a08d4..542fea4de 100644
>> > > > > > > > --- a/config/meson.build
>> > > > > > > > +++ b/config/meson.build
>> > > > > > > > @@ -35,6 +35,7 @@ dpdk_conf.set('RTE_MACHINE', machine)
>> > > > > > > > add_project_arguments('-march=@0@'.format(machine),
>> > > > > > > > language: 'c')
>> > > > > > > > # some libs depend on maths lib
>> > > > > > > > add_project_link_arguments('-lm', language: 'c')
>> > > > > > > > +dpdk_extra_ldflags += '-lm'
>> > > > > > > >
>> > > > > > > > # add -include rte_config to cflags
>> > > > > > > > add_project_arguments('-include', 'rte_config.h',
>> > > > > > > > language:
>> > > > > > > > 'c')
>> > > > > > >
>> > > > > > > This is for static builds, right? If so it should go into
>> > > > > > > the
>> > > > > > > Libs.private section of the .pc file, so that it's only
>> > > > > > > used
>> > > > > > > when
>> > > > > > > calling pkg-config --static --libs
>> > > > > >
>> > > > > > Bit of a brain fart - what I meant is, in order to have
>> > > > > > static
>> > > > > > builds
>> > > > > > work out of the box with pkg-config --static, -lm (and any
>> > > > > > other
>> > > > > > dependency used internally) could also be added to
>> > > > > > Libs.private
>> > > > > > in the
>> > > > > > .pc
>> > > > >
>> > > > > Does that not assume that both static and dynamic libs are
>> > > > > installed
>> > > > > side-by-side? In DPDK case, we will either build static libs
>> > > > > or
>> > > > > shared
>> > > > > libs, but not both. If we require applications to use
>> > > > > different
>> > > > > pkg-config commands depending on the type of DPDK build that
>> > > > > was
>> > > > > done,
>> > > > > it makes things awkward for the apps. Right now by putting
>> > > > > all libs
>> > > > > and
>> > > > > flags into the libs section of pkgconfig, and having the
>> > > > > build
>> > > > > system
>> > > > > track whether it's static or dynamic and therefore what is
>> > > > > actually
>> > > > > necessary, we end up in a case where apps can be built
>> > > > > against DPDK
>> > > > > irrespective of the actual build type done. For this
>> > > > > particular -lm
>> > > > > flag, for instance, it only appears in the .pc file for
>> > > > > static
>> > > > > builds.
>> > > > >
>> > > > > See the patches for the sample app Makefiles. Not sure how
>> > > > > that can
>> > > > > be
>> > > > > made to work if we use different pkg-config settings for
>> > > > > different
>> > > > > build
>> > > > > types.
>> > > > >
>> > > > > Your input and suggestions here would be welcome.
>> > >
>> > > Yes that works nicely when the libraries are rebuilt locally -
>> > > then it
>> > > can be chosen whether to build the static or dynamic ones.
>> > >
>> > > In the packaging case though, at least in Debian and Ubuntu (not
>> > > sure
>> > > about RHEL/SUSE), we do ship both static and dynamic libraries at
>> > > the
>> > > same time, following best practices. So we'd have to choose and
>> > > either
>> > > cause applications linking dynamically to over-link (which is
>> > > what we
>> > > currently do in Debian/Ubuntu and many developers really don't
>> > > like
>> > > that) or to cause applications that use the static libraries to
>> > > have to
>> > > manually add the missing flags.
>> > >
>> > > From what I can see, the most common workflow for applications
>> > > that
>> > > want to do static builds when using packaged libraries is to use
>> > > the --
>> > > static flag of pkgconfig.
>> > > This has the advantage of being a ""standardised"" workflow,
>> > > expected
>> > > to work across any dependency, not just DPDK. Of course that's
>> > > not
>> > > always the case, but one can dream :-)
>> > >
>> > > If you prefer to optimise for the local build workflow that's
>> > > fine, we
>> > > can patch it in the distro, it's not too much overhead (I need to
>> > > do it
>> > > anyway for the old build system at some point).
>> > >
>> > > >
>> > > > +Thomas, Olivier, Sergio to get more input
>> > > >
>> > > > Thinking about it some more, is there any reason why we can't
>> > > > or
>> > > > shouldn't do both static and dynamic libs in all builds, and
>> > > > then let
>> > > > apps use pkg-config to determine what they want to link
>> > > > against? It
>> > > > wouldn't be a massive change to the new build system to do
>> > > > that, I
>> > > > think.
>> > > >
>> > > > /Bruce
>> > >
>> > > Yes that would be ideal! Right now in Debian/Ubuntu we have to
>> > > build
>> > > twice, doubling the required time unfortunately.
>> > >
>> > > In theory the same objects could be packed into .ar and .so but
>> > > sadly
>> > > Meson doesn't support that yet like autotools/cmake do:
>> > >
>> > > https://github.com/mesonbuild/meson/issues/484
>> > >
>> > > (please do add some feedback there as developers!)
>> > >
>> > > It looks like it could be possible with some extensive hacking,
>> > > not
>> > > sure if it would be worth it.
>> > >
>> >
>> > Actually, I think it's workable using extract_objects. Build the
>> > static
>> > lib first, then extract_all_objects() and then use those to build
>> > the .so.
>> > I can prototype it very easily by changing lib/meson.build and see
>> > what
>> > happens.
>> >
>>
>> Seems to work fine. This change makes all the libraries (bar EAL,
>> which
>> is special-cased) appear as both .a and .so. Testpmd links against
>> the
>> dynamic versions and still works.
>>
>> When I get the chance I'll see about doing the same for EAL and
>> drivers,
>> and then having the pkgconfig file reflect both possibilities. Then I
>> can test with some examples linking both dynamically and statically
>> and
>> check all is as expected.
>>
>> /Bruce
>>
>> diff --git a/lib/meson.build b/lib/meson.build
>> index f04cb2791..29c88548b 100644
>> --- a/lib/meson.build
>> +++ b/lib/meson.build
>> @@ -76,6 +76,20 @@ foreach l:libraries
>> dep_objs += [get_variable('dep_rte_' + d)]
>> endforeach
>>
>> + libname = 'rte_' + name
>> +
>> +# first build static library
>> + static_lib = static_library(libname, sources,
>> + objects: objs,
>> + c_args: cflags,
>> + dependencies: dep_objs,
>> + include_directories:
>> include_directories(dir_name),
>> + install: true)
>> +
>> +# now use those objects to build dynamic library
>> + sources = []
>> + objs += static_lib.extract_all_objects()
>> +
>> if get_option('per_library_versions')
>> lib_version = '@0@.1'.format(version)
>> so_version = '@0@'.format(version)
>> @@ -87,8 +101,7 @@ foreach l:libraries
>>
>> version_map = '@0@/@1@/rte_@2@_version.map'.format(
>> meson.current_source_dir(), dir_name,
>> name)
>> - libname = 'rte_' + name
>> - lib = library(libname,
>> + lib = shared_library(libname,
>> sources,
>> objects: objs,
>> c_args: cflags,
>
> Nice! Much easier than I thought reading that thread :-)
>
> I'll try to give it a test run in the next few days. Thanks!
Would there be any opposition if someone were to feel ambitious and
attempt this for the existing build system as well? Not me, of course.
Asking for a friend, that's all. ;)
Having both library types spit out is really useful. One less config
option, etc.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 19:13 ` Aaron Conole
@ 2017-10-18 19:21 ` Thomas Monjalon
2017-10-19 8:38 ` Bruce Richardson
0 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2017-10-18 19:21 UTC (permalink / raw)
To: Aaron Conole
Cc: Luca Boccassi, Bruce Richardson, dev, olivier.matz,
sergio.gonzalez.monroy
18/10/2017 21:13, Aaron Conole:
> Luca Boccassi <bluca@debian.org> writes:
> > On Wed, 2017-10-18 at 15:20 +0100, Bruce Richardson wrote:
> >> On Wed, Oct 18, 2017 at 01:24:54PM +0100, Bruce Richardson wrote:
> >> > On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
> >> > > On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> >> > > > Thinking about it some more, is there any reason why we can't
> >> > > > or
> >> > > > shouldn't do both static and dynamic libs in all builds, and
> >> > > > then let
> >> > > > apps use pkg-config to determine what they want to link
> >> > > > against? It
> >> > > > wouldn't be a massive change to the new build system to do
> >> > > > that, I
> >> > > > think.
> >> > > >
> >> > > > /Bruce
> >> > >
> >> > > Yes that would be ideal! Right now in Debian/Ubuntu we have to
> >> > > build
> >> > > twice, doubling the required time unfortunately.
> >> > >
> >> > > In theory the same objects could be packed into .ar and .so but
> >> > > sadly
> >> > > Meson doesn't support that yet like autotools/cmake do:
> >> > >
> >> > > https://github.com/mesonbuild/meson/issues/484
> >> > >
> >> > > (please do add some feedback there as developers!)
> >> > >
> >> > > It looks like it could be possible with some extensive hacking,
> >> > > not
> >> > > sure if it would be worth it.
> >> > >
> >> >
> >> > Actually, I think it's workable using extract_objects. Build the
> >> > static
> >> > lib first, then extract_all_objects() and then use those to build
> >> > the .so.
> >> > I can prototype it very easily by changing lib/meson.build and see
> >> > what
> >> > happens.
> >> >
> >>
> >> Seems to work fine. This change makes all the libraries (bar EAL,
> >> which
> >> is special-cased) appear as both .a and .so. Testpmd links against
> >> the
> >> dynamic versions and still works.
> >>
> >> When I get the chance I'll see about doing the same for EAL and
> >> drivers,
> >> and then having the pkgconfig file reflect both possibilities. Then I
> >> can test with some examples linking both dynamically and statically
> >> and
> >> check all is as expected.
[...]
> > Nice! Much easier than I thought reading that thread :-)
> >
> > I'll try to give it a test run in the next few days. Thanks!
>
> Would there be any opposition if someone were to feel ambitious and
> attempt this for the existing build system as well? Not me, of course.
> Asking for a friend, that's all. ;)
You can say to your friend that it must be done in one compilation pass
to avoid losing too much time. Only the link step would be duplicate.
Then your friend should think about how to link the applications.
Whould -you- he keep the config option or link the app in two flavours?
> Having both library types spit out is really useful. One less config
> option, etc.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file
2017-10-18 19:21 ` Thomas Monjalon
@ 2017-10-19 8:38 ` Bruce Richardson
0 siblings, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-19 8:38 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Aaron Conole, Luca Boccassi, dev, olivier.matz, sergio.gonzalez.monroy
On Wed, Oct 18, 2017 at 09:21:52PM +0200, Thomas Monjalon wrote:
> 18/10/2017 21:13, Aaron Conole:
> > Luca Boccassi <bluca@debian.org> writes:
> > > On Wed, 2017-10-18 at 15:20 +0100, Bruce Richardson wrote:
> > >> On Wed, Oct 18, 2017 at 01:24:54PM +0100, Bruce Richardson wrote:
> > >> > On Wed, Oct 18, 2017 at 11:14:07AM +0100, Luca Boccassi wrote:
> > >> > > On Wed, 2017-10-18 at 10:51 +0100, Bruce Richardson wrote:
> > >> > > > Thinking about it some more, is there any reason why we can't
> > >> > > > or
> > >> > > > shouldn't do both static and dynamic libs in all builds, and
> > >> > > > then let
> > >> > > > apps use pkg-config to determine what they want to link
> > >> > > > against? It
> > >> > > > wouldn't be a massive change to the new build system to do
> > >> > > > that, I
> > >> > > > think.
> > >> > > >
> > >> > > > /Bruce
> > >> > >
> > >> > > Yes that would be ideal! Right now in Debian/Ubuntu we have to
> > >> > > build
> > >> > > twice, doubling the required time unfortunately.
> > >> > >
> > >> > > In theory the same objects could be packed into .ar and .so but
> > >> > > sadly
> > >> > > Meson doesn't support that yet like autotools/cmake do:
> > >> > >
> > >> > > https://github.com/mesonbuild/meson/issues/484
> > >> > >
> > >> > > (please do add some feedback there as developers!)
> > >> > >
> > >> > > It looks like it could be possible with some extensive hacking,
> > >> > > not
> > >> > > sure if it would be worth it.
> > >> > >
> > >> >
> > >> > Actually, I think it's workable using extract_objects. Build the
> > >> > static
> > >> > lib first, then extract_all_objects() and then use those to build
> > >> > the .so.
> > >> > I can prototype it very easily by changing lib/meson.build and see
> > >> > what
> > >> > happens.
> > >> >
> > >>
> > >> Seems to work fine. This change makes all the libraries (bar EAL,
> > >> which
> > >> is special-cased) appear as both .a and .so. Testpmd links against
> > >> the
> > >> dynamic versions and still works.
> > >>
> > >> When I get the chance I'll see about doing the same for EAL and
> > >> drivers,
> > >> and then having the pkgconfig file reflect both possibilities. Then I
> > >> can test with some examples linking both dynamically and statically
> > >> and
> > >> check all is as expected.
> [...]
> > > Nice! Much easier than I thought reading that thread :-)
> > >
> > > I'll try to give it a test run in the next few days. Thanks!
> >
> > Would there be any opposition if someone were to feel ambitious and
> > attempt this for the existing build system as well? Not me, of course.
> > Asking for a friend, that's all. ;)
>
> You can say to your friend that it must be done in one compilation pass
> to avoid losing too much time. Only the link step would be duplicate.
>
> Then your friend should think about how to link the applications.
> Whould -you- he keep the config option or link the app in two flavours?
>
One other thing that needs to be done is a minor change to the EAL to
not error out if the EAL_PMD_PATH directory does not exist. Right now
with shared builds we set this to where the drivers will go, but for
static builds this has to be NULL otherwise we get errors. Ideally, this
should be ok to have as the .so driver path, even if we only have static
libs installed.
Furthermore, has anyone tested to see what happens if we have all the
drivers statically linked into testpmd, but EAL_PMD_PATH has a path to
the .so files? Do we just get duplicate copies of the drivers, and
nothing else goes wrong, or does the application halt and catch fire?
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 0/8] Support sample applications with new build system
2017-10-18 17:11 ` [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Luca Boccassi
@ 2017-10-19 8:39 ` Bruce Richardson
2017-10-23 10:43 ` Bruce Richardson
1 sibling, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-19 8:39 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev
On Wed, Oct 18, 2017 at 06:11:51PM +0100, Luca Boccassi wrote:
> On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > This patchset enables sample apps to be used with the new meson build
> > system. The work is really three-fold:
> >
> > * fix issues and pre-requisites to get the sample apps compiling,
> > such as
> > ensuring that all needed PMDs are enabled, e.g. bond PMD for bond
> > example
> > * allow examples - one or more - to built as part of a regular build,
> > so as
> > to allow easier testing of feature X using its sample app
> > * change the example app Makefiles so that when compiled as
> > standalone
> > entities they use the pkg-config information when available, and
> > only the
> > DPDK makefile system if pkgconfig info is not installed.
> >
> > Bruce Richardson (8):
> > build: add maths library to libs in pkg-config file
> > build: add detection and use of libnuma
> > lpm: install vector header files
> > event: add skeleton and sw eventdevs to meson build
> > net/bonding: add to meson build
> > examples: allow building examples as part of a meson build
> > examples: put app name and sources at top of makefiles
> > examples: use pkg-config info when building examples
> >
> > config/meson.build | 11 ++++
> > drivers/event/meson.build | 35 ++++++++++
> > drivers/event/skeleton/meson.build | 32 +++++++++
> > drivers/event/sw/meson.build | 37 +++++++++++
> > drivers/meson.build | 2 +-
> > drivers/net/bonding/meson.build | 39 +++++++++++
> > drivers/net/meson.build | 3 +-
> > examples/bond/Makefile | 35 ++++++++--
> > examples/bond/meson.build | 40 ++++++++++++
> > examples/cmdline/Makefile | 29 +++++++++
> > examples/cmdline/meson.build | 39 +++++++++++
> > examples/distributor/Makefile | 35 ++++++++--
> > examples/distributor/meson.build | 40 ++++++++++++
> > examples/eventdev_pipeline_sw_pmd/Makefile | 35 ++++++++--
> > examples/eventdev_pipeline_sw_pmd/meson.build | 40 ++++++++++++
> > examples/exception_path/Makefile | 35 ++++++++--
> > examples/exception_path/meson.build | 39 +++++++++++
> > examples/helloworld/Makefile | 35 ++++++++--
> > examples/helloworld/meson.build | 39 +++++++++++
> > examples/ip_fragmentation/Makefile | 35 ++++++++--
> > examples/ip_fragmentation/meson.build | 40 ++++++++++++
> > examples/ip_pipeline/Makefile | 93
> > ++++++++++++++++++---------
> > examples/ip_pipeline/meson.build | 63
> > ++++++++++++++++++
> > examples/ip_reassembly/Makefile | 35 ++++++++--
> > examples/ip_reassembly/meson.build | 40 ++++++++++++
> > examples/ipsec-secgw/Makefile | 55 +++++++++++-----
> > examples/ipsec-secgw/meson.build | 41 ++++++++++++
> > examples/ipv4_multicast/Makefile | 35 ++++++++--
> > examples/ipv4_multicast/meson.build | 40 ++++++++++++
> > examples/kni/Makefile | 34 ++++++++--
> > examples/kni/meson.build | 40 ++++++++++++
> > examples/l2fwd-cat/Makefile | 37 +++++++++--
> > examples/l2fwd-cat/meson.build | 42 ++++++++++++
> > examples/l2fwd-crypto/Makefile | 34 ++++++++--
> > examples/l2fwd-crypto/meson.build | 40 ++++++++++++
> > examples/l2fwd-jobstats/Makefile | 34 ++++++++--
> > examples/l2fwd-jobstats/meson.build | 40 ++++++++++++
> > examples/l2fwd-keepalive/Makefile | 36 +++++++++--
> > examples/l2fwd-keepalive/meson.build | 40 ++++++++++++
> > examples/l2fwd/Makefile | 34 ++++++++--
> > examples/l2fwd/meson.build | 39 +++++++++++
> > examples/l3fwd-acl/Makefile | 34 ++++++++--
> > examples/l3fwd-acl/meson.build | 40 ++++++++++++
> > examples/l3fwd-power/Makefile | 34 ++++++++--
> > examples/l3fwd-power/meson.build | 40 ++++++++++++
> > examples/l3fwd-vf/Makefile | 34 ++++++++--
> > examples/l3fwd-vf/meson.build | 40 ++++++++++++
> > examples/l3fwd/Makefile | 34 ++++++++--
> > examples/l3fwd/meson.build | 40 ++++++++++++
> > examples/link_status_interrupt/Makefile | 34 ++++++++--
> > examples/link_status_interrupt/meson.build | 39 +++++++++++
> > examples/load_balancer/Makefile | 34 ++++++++--
> > examples/load_balancer/meson.build | 40 ++++++++++++
> > examples/meson.build | 59 +++++++++++++++++
> > examples/multi_process/l2fwd_fork/Makefile | 12 ++--
> > examples/packet_ordering/Makefile | 34 ++++++++--
> > examples/packet_ordering/meson.build | 40 ++++++++++++
> > examples/ptpclient/Makefile | 34 ++++++++--
> > examples/ptpclient/meson.build | 39 +++++++++++
> > examples/qos_meter/Makefile | 34 ++++++++--
> > examples/qos_meter/meson.build | 40 ++++++++++++
> > examples/qos_sched/Makefile | 34 ++++++++--
> > examples/qos_sched/meson.build | 41 ++++++++++++
> > examples/rxtx_callbacks/Makefile | 34 ++++++++--
> > examples/rxtx_callbacks/meson.build | 39 +++++++++++
> > examples/skeleton/Makefile | 34 ++++++++--
> > examples/skeleton/meson.build | 39 +++++++++++
> > examples/tep_termination/Makefile | 34 ++++++++--
> > examples/tep_termination/meson.build | 40 ++++++++++++
> > examples/timer/Makefile | 34 ++++++++--
> > examples/timer/meson.build | 40 ++++++++++++
> > examples/vhost/Makefile | 34 ++++++++--
> > examples/vhost/meson.build | 40 ++++++++++++
> > examples/vhost_scsi/Makefile | 39 ++++++++---
> > examples/vhost_scsi/meson.build | 41 ++++++++++++
> > examples/vmdq/Makefile | 34 ++++++++--
> > examples/vmdq/meson.build | 39 +++++++++++
> > examples/vmdq_dcb/Makefile | 34 ++++++++--
> > examples/vmdq_dcb/meson.build | 39 +++++++++++
> > lib/librte_eal/linuxapp/eal/meson.build | 3 +
> > lib/librte_lpm/meson.build | 3 +
> > lib/librte_vhost/meson.build | 3 +
> > meson.build | 5 ++
> > meson_options.txt | 2 +
> > 84 files changed, 2699 insertions(+), 248 deletions(-)
> > create mode 100644 drivers/event/meson.build
> > create mode 100644 drivers/event/skeleton/meson.build
> > create mode 100644 drivers/event/sw/meson.build
> > create mode 100644 drivers/net/bonding/meson.build
> > create mode 100644 examples/bond/meson.build
> > create mode 100644 examples/cmdline/meson.build
> > create mode 100644 examples/distributor/meson.build
> > create mode 100644 examples/eventdev_pipeline_sw_pmd/meson.build
> > create mode 100644 examples/exception_path/meson.build
> > create mode 100644 examples/helloworld/meson.build
> > create mode 100644 examples/ip_fragmentation/meson.build
> > create mode 100644 examples/ip_pipeline/meson.build
> > create mode 100644 examples/ip_reassembly/meson.build
> > create mode 100644 examples/ipsec-secgw/meson.build
> > create mode 100644 examples/ipv4_multicast/meson.build
> > create mode 100644 examples/kni/meson.build
> > create mode 100644 examples/l2fwd-cat/meson.build
> > create mode 100644 examples/l2fwd-crypto/meson.build
> > create mode 100644 examples/l2fwd-jobstats/meson.build
> > create mode 100644 examples/l2fwd-keepalive/meson.build
> > create mode 100644 examples/l2fwd/meson.build
> > create mode 100644 examples/l3fwd-acl/meson.build
> > create mode 100644 examples/l3fwd-power/meson.build
> > create mode 100644 examples/l3fwd-vf/meson.build
> > create mode 100644 examples/l3fwd/meson.build
> > create mode 100644 examples/link_status_interrupt/meson.build
> > create mode 100644 examples/load_balancer/meson.build
> > create mode 100644 examples/meson.build
> > create mode 100644 examples/packet_ordering/meson.build
> > create mode 100644 examples/ptpclient/meson.build
> > create mode 100644 examples/qos_meter/meson.build
> > create mode 100644 examples/qos_sched/meson.build
> > create mode 100644 examples/rxtx_callbacks/meson.build
> > create mode 100644 examples/skeleton/meson.build
> > create mode 100644 examples/tep_termination/meson.build
> > create mode 100644 examples/timer/meson.build
> > create mode 100644 examples/vhost/meson.build
> > create mode 100644 examples/vhost_scsi/meson.build
> > create mode 100644 examples/vmdq/meson.build
> > create mode 100644 examples/vmdq_dcb/meson.build
>
> Reviewed-by: Luca Boccassi <bluca@debian.org>
>
> Forgot to write that regardless of what we can do with the static +
> dynamic builds, the series looks good. Thanks!
>
Yes, still a few loose ends on the static+dynamic, e.g. how to link
testpmd and samples by default. My current thinking is to use the meson
"default_library" option to select that.
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [dpdk-dev] [PATCH 0/8] Support sample applications with new build system
2017-10-18 17:11 ` [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Luca Boccassi
2017-10-19 8:39 ` Bruce Richardson
@ 2017-10-23 10:43 ` Bruce Richardson
1 sibling, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2017-10-23 10:43 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev
On Wed, Oct 18, 2017 at 06:11:51PM +0100, Luca Boccassi wrote:
> On Tue, 2017-10-17 at 17:12 +0100, Bruce Richardson wrote:
> > This patchset enables sample apps to be used with the new meson build
> > system. The work is really three-fold:
> >
> > * fix issues and pre-requisites to get the sample apps compiling,
> > such as
> > ensuring that all needed PMDs are enabled, e.g. bond PMD for bond
> > example
> > * allow examples - one or more - to built as part of a regular build,
> > so as
> > to allow easier testing of feature X using its sample app
> > * change the example app Makefiles so that when compiled as
> > standalone
> > entities they use the pkg-config information when available, and
> > only the
> > DPDK makefile system if pkgconfig info is not installed.
> >
> > Bruce Richardson (8):
> > build: add maths library to libs in pkg-config file
> > build: add detection and use of libnuma
> > lpm: install vector header files
> > event: add skeleton and sw eventdevs to meson build
> > net/bonding: add to meson build
> > examples: allow building examples as part of a meson build
> > examples: put app name and sources at top of makefiles
> > examples: use pkg-config info when building examples
> >
> > config/meson.build | 11 ++++
> > drivers/event/meson.build | 35 ++++++++++
> > drivers/event/skeleton/meson.build | 32 +++++++++
> > drivers/event/sw/meson.build | 37 +++++++++++
> > drivers/meson.build | 2 +-
> > drivers/net/bonding/meson.build | 39 +++++++++++
> > drivers/net/meson.build | 3 +-
> > examples/bond/Makefile | 35 ++++++++--
> > examples/bond/meson.build | 40 ++++++++++++
> > examples/cmdline/Makefile | 29 +++++++++
> > examples/cmdline/meson.build | 39 +++++++++++
> > examples/distributor/Makefile | 35 ++++++++--
> > examples/distributor/meson.build | 40 ++++++++++++
> > examples/eventdev_pipeline_sw_pmd/Makefile | 35 ++++++++--
> > examples/eventdev_pipeline_sw_pmd/meson.build | 40 ++++++++++++
> > examples/exception_path/Makefile | 35 ++++++++--
> > examples/exception_path/meson.build | 39 +++++++++++
> > examples/helloworld/Makefile | 35 ++++++++--
> > examples/helloworld/meson.build | 39 +++++++++++
> > examples/ip_fragmentation/Makefile | 35 ++++++++--
> > examples/ip_fragmentation/meson.build | 40 ++++++++++++
> > examples/ip_pipeline/Makefile | 93
> > ++++++++++++++++++---------
> > examples/ip_pipeline/meson.build | 63
> > ++++++++++++++++++
> > examples/ip_reassembly/Makefile | 35 ++++++++--
> > examples/ip_reassembly/meson.build | 40 ++++++++++++
> > examples/ipsec-secgw/Makefile | 55 +++++++++++-----
> > examples/ipsec-secgw/meson.build | 41 ++++++++++++
> > examples/ipv4_multicast/Makefile | 35 ++++++++--
> > examples/ipv4_multicast/meson.build | 40 ++++++++++++
> > examples/kni/Makefile | 34 ++++++++--
> > examples/kni/meson.build | 40 ++++++++++++
> > examples/l2fwd-cat/Makefile | 37 +++++++++--
> > examples/l2fwd-cat/meson.build | 42 ++++++++++++
> > examples/l2fwd-crypto/Makefile | 34 ++++++++--
> > examples/l2fwd-crypto/meson.build | 40 ++++++++++++
> > examples/l2fwd-jobstats/Makefile | 34 ++++++++--
> > examples/l2fwd-jobstats/meson.build | 40 ++++++++++++
> > examples/l2fwd-keepalive/Makefile | 36 +++++++++--
> > examples/l2fwd-keepalive/meson.build | 40 ++++++++++++
> > examples/l2fwd/Makefile | 34 ++++++++--
> > examples/l2fwd/meson.build | 39 +++++++++++
> > examples/l3fwd-acl/Makefile | 34 ++++++++--
> > examples/l3fwd-acl/meson.build | 40 ++++++++++++
> > examples/l3fwd-power/Makefile | 34 ++++++++--
> > examples/l3fwd-power/meson.build | 40 ++++++++++++
> > examples/l3fwd-vf/Makefile | 34 ++++++++--
> > examples/l3fwd-vf/meson.build | 40 ++++++++++++
> > examples/l3fwd/Makefile | 34 ++++++++--
> > examples/l3fwd/meson.build | 40 ++++++++++++
> > examples/link_status_interrupt/Makefile | 34 ++++++++--
> > examples/link_status_interrupt/meson.build | 39 +++++++++++
> > examples/load_balancer/Makefile | 34 ++++++++--
> > examples/load_balancer/meson.build | 40 ++++++++++++
> > examples/meson.build | 59 +++++++++++++++++
> > examples/multi_process/l2fwd_fork/Makefile | 12 ++--
> > examples/packet_ordering/Makefile | 34 ++++++++--
> > examples/packet_ordering/meson.build | 40 ++++++++++++
> > examples/ptpclient/Makefile | 34 ++++++++--
> > examples/ptpclient/meson.build | 39 +++++++++++
> > examples/qos_meter/Makefile | 34 ++++++++--
> > examples/qos_meter/meson.build | 40 ++++++++++++
> > examples/qos_sched/Makefile | 34 ++++++++--
> > examples/qos_sched/meson.build | 41 ++++++++++++
> > examples/rxtx_callbacks/Makefile | 34 ++++++++--
> > examples/rxtx_callbacks/meson.build | 39 +++++++++++
> > examples/skeleton/Makefile | 34 ++++++++--
> > examples/skeleton/meson.build | 39 +++++++++++
> > examples/tep_termination/Makefile | 34 ++++++++--
> > examples/tep_termination/meson.build | 40 ++++++++++++
> > examples/timer/Makefile | 34 ++++++++--
> > examples/timer/meson.build | 40 ++++++++++++
> > examples/vhost/Makefile | 34 ++++++++--
> > examples/vhost/meson.build | 40 ++++++++++++
> > examples/vhost_scsi/Makefile | 39 ++++++++---
> > examples/vhost_scsi/meson.build | 41 ++++++++++++
> > examples/vmdq/Makefile | 34 ++++++++--
> > examples/vmdq/meson.build | 39 +++++++++++
> > examples/vmdq_dcb/Makefile | 34 ++++++++--
> > examples/vmdq_dcb/meson.build | 39 +++++++++++
> > lib/librte_eal/linuxapp/eal/meson.build | 3 +
> > lib/librte_lpm/meson.build | 3 +
> > lib/librte_vhost/meson.build | 3 +
> > meson.build | 5 ++
> > meson_options.txt | 2 +
> > 84 files changed, 2699 insertions(+), 248 deletions(-)
> > create mode 100644 drivers/event/meson.build
> > create mode 100644 drivers/event/skeleton/meson.build
> > create mode 100644 drivers/event/sw/meson.build
> > create mode 100644 drivers/net/bonding/meson.build
> > create mode 100644 examples/bond/meson.build
> > create mode 100644 examples/cmdline/meson.build
> > create mode 100644 examples/distributor/meson.build
> > create mode 100644 examples/eventdev_pipeline_sw_pmd/meson.build
> > create mode 100644 examples/exception_path/meson.build
> > create mode 100644 examples/helloworld/meson.build
> > create mode 100644 examples/ip_fragmentation/meson.build
> > create mode 100644 examples/ip_pipeline/meson.build
> > create mode 100644 examples/ip_reassembly/meson.build
> > create mode 100644 examples/ipsec-secgw/meson.build
> > create mode 100644 examples/ipv4_multicast/meson.build
> > create mode 100644 examples/kni/meson.build
> > create mode 100644 examples/l2fwd-cat/meson.build
> > create mode 100644 examples/l2fwd-crypto/meson.build
> > create mode 100644 examples/l2fwd-jobstats/meson.build
> > create mode 100644 examples/l2fwd-keepalive/meson.build
> > create mode 100644 examples/l2fwd/meson.build
> > create mode 100644 examples/l3fwd-acl/meson.build
> > create mode 100644 examples/l3fwd-power/meson.build
> > create mode 100644 examples/l3fwd-vf/meson.build
> > create mode 100644 examples/l3fwd/meson.build
> > create mode 100644 examples/link_status_interrupt/meson.build
> > create mode 100644 examples/load_balancer/meson.build
> > create mode 100644 examples/meson.build
> > create mode 100644 examples/packet_ordering/meson.build
> > create mode 100644 examples/ptpclient/meson.build
> > create mode 100644 examples/qos_meter/meson.build
> > create mode 100644 examples/qos_sched/meson.build
> > create mode 100644 examples/rxtx_callbacks/meson.build
> > create mode 100644 examples/skeleton/meson.build
> > create mode 100644 examples/tep_termination/meson.build
> > create mode 100644 examples/timer/meson.build
> > create mode 100644 examples/vhost/meson.build
> > create mode 100644 examples/vhost_scsi/meson.build
> > create mode 100644 examples/vmdq/meson.build
> > create mode 100644 examples/vmdq_dcb/meson.build
>
> Reviewed-by: Luca Boccassi <bluca@debian.org>
>
> Forgot to write that regardless of what we can do with the static +
> dynamic builds, the series looks good. Thanks!
>
Applied to dpdk-next-build
/Bruce
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2017-10-23 10:43 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17 16:12 [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 1/8] build: add maths library to libs in pkg-config file Bruce Richardson
2017-10-17 18:11 ` Luca Boccassi
2017-10-17 18:17 ` Luca Boccassi
2017-10-18 9:35 ` Bruce Richardson
2017-10-18 9:51 ` Bruce Richardson
2017-10-18 10:14 ` Luca Boccassi
2017-10-18 12:24 ` Bruce Richardson
2017-10-18 14:20 ` Bruce Richardson
2017-10-18 15:28 ` Luca Boccassi
2017-10-18 19:13 ` Aaron Conole
2017-10-18 19:21 ` Thomas Monjalon
2017-10-19 8:38 ` Bruce Richardson
2017-10-18 11:20 ` Thomas Monjalon
2017-10-18 12:28 ` Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 2/8] build: add detection and use of libnuma Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 3/8] lpm: install vector header files Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 4/8] event: add skeleton and sw eventdevs to meson build Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 5/8] net/bonding: add " Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 6/8] examples: allow building examples as part of a " Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 7/8] examples: put app name and sources at top of makefiles Bruce Richardson
2017-10-17 16:12 ` [dpdk-dev] [PATCH 8/8] examples: use pkg-config info when building examples Bruce Richardson
2017-10-18 17:11 ` [dpdk-dev] [PATCH 0/8] Support sample applications with new build system Luca Boccassi
2017-10-19 8:39 ` Bruce Richardson
2017-10-23 10:43 ` Bruce Richardson
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).