diff mbox

[dpdk-dev,2/2] net/mvpp2: add meson build file

Message ID 1523447107-13324-3-git-send-email-tdu@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tomasz Duszynski April 11, 2018, 11:45 a.m. UTC
Add support for building MRVL MVPP2 PMD with meson.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 drivers/net/meson.build       |  2 +-
 drivers/net/mvpp2/meson.build | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/mvpp2/meson.build
diff mbox

Patch

diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index b7cac4a..b7d00a0 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -3,7 +3,7 @@ 
 
 drivers = ['af_packet', 'axgbe', 'bonding', 'dpaa', 'dpaa2',
 	'e1000', 'enic', 'fm10k', 'i40e', 'ixgbe',
-	'null', 'octeontx', 'pcap', 'ring',
+	'mvpp2', 'null', 'octeontx', 'pcap', 'ring',
 	'sfc', 'thunderx', 'virtio']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
diff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build
new file mode 100644
index 0000000..6ea13ee
--- /dev/null
+++ b/drivers/net/mvpp2/meson.build
@@ -0,0 +1,25 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Marvell International Ltd.
+# Copyright(c) 2018 Semihalf.
+# All rights reserved.
+
+path = run_command('printenv', 'LIBMUSDK_PATH').stdout().strip()
+lib_dir = path + '/lib'
+inc_dir = path + '/include'
+
+lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false)
+if not lib.found()
+	build = false
+else
+	ext_deps += lib
+	includes += include_directories(inc_dir)
+	cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+endif
+
+sources = files(
+	'mrvl_ethdev.c',
+	'mrvl_flow.c',
+	'mrvl_qos.c'
+)
+
+deps += ['cfgfile']