[v2] meson: update meson build for armada drivers
Checks
Commit Message
From: Liron Himi <lironh@marvell.com>
With pkg-config support available within musdk library
(from musdk-release-SDK-10.3.5.0-PR2 version),
meson option 'lib_musdk_dir' can be removed.
PKG_CONFIG_PATH environment variable should be set appropriately
to use the musdk library.
docs are updated with new musdk version and meson instructions.
Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
v2:
* include updated docs in this patch
* add musdk version in commit message
---
doc/guides/nics/mvneta.rst | 13 ++++++++-----
doc/guides/nics/mvpp2.rst | 15 +++++++++------
drivers/common/mvep/meson.build | 14 +++++---------
drivers/crypto/mvsam/meson.build | 15 +++++----------
drivers/net/mvneta/meson.build | 19 +++++--------------
drivers/net/mvneta/mvneta_ethdev.h | 1 +
drivers/net/mvpp2/meson.build | 15 +++++----------
meson_options.txt | 2 --
8 files changed, 38 insertions(+), 56 deletions(-)
Comments
On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
> From: Liron Himi <lironh@marvell.com>
>
> With pkg-config support available within musdk library
> (from musdk-release-SDK-10.3.5.0-PR2 version),
> meson option 'lib_musdk_dir' can be removed.
> PKG_CONFIG_PATH environment variable should be set appropriately
> to use the musdk library.
Hi Liron,
It is good change to get rid of an custom meson option, can we or should we
backport this to the v20.11?
>
> docs are updated with new musdk version and meson instructions.
>
> Signed-off-by: Liron Himi <lironh@marvell.com>
> Reviewed-by: Liron Himi <lironh@marvell.com>
> ---
> v2:
> * include updated docs in this patch
> * add musdk version in commit message
> ---
> doc/guides/nics/mvneta.rst | 13 ++++++++-----
> doc/guides/nics/mvpp2.rst | 15 +++++++++------
> drivers/common/mvep/meson.build | 14 +++++---------
> drivers/crypto/mvsam/meson.build | 15 +++++----------
@Ahil, is it OK if I get this to the next-net, since logically related?
> drivers/net/mvneta/meson.build | 19 +++++--------------
> drivers/net/mvneta/mvneta_ethdev.h | 1 +
> drivers/net/mvpp2/meson.build | 15 +++++----------
> meson_options.txt | 2 --
> 8 files changed, 38 insertions(+), 56 deletions(-)
>
<...>
> @@ -94,7 +94,7 @@ be passed as part of EAL arguments.
> -c 3 -- -i --p 3 -a
>
>
> -Building DPDK
> +Building MUSDK
> -------------
>
This is giving doc warning because of "Title underline too short".
<...>
> @@ -108,7 +108,7 @@ Prerequisites
> DPDK environment.
>
>
> -Building DPDK
> +Building MUSDK
> -------------
>
Ditto.
<...>
> diff --git a/drivers/net/mvneta/mvneta_ethdev.h b/drivers/net/mvneta/mvneta_ethdev.h
> index ef8067790..e090abc25 100644
> --- a/drivers/net/mvneta/mvneta_ethdev.h
> +++ b/drivers/net/mvneta/mvneta_ethdev.h
> @@ -21,6 +21,7 @@
> #undef container_of
> #endif
>
> +#include <env/mv_autogen_comp_flags.h>
Is this include related with this patch?
-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com>
Sent: Wednesday, 16 December 2020 15:37
To: Liron Himi <lironh@marvell.com>
Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
External Email
----------------------------------------------------------------------
On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
> From: Liron Himi <lironh@marvell.com>
>
> With pkg-config support available within musdk library (from
> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> can be removed.
> PKG_CONFIG_PATH environment variable should be set appropriately to
> use the musdk library.
Hi Liron,
It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
[L.H.] yes, it can be backported.
>
> docs are updated with new musdk version and meson instructions.
>
> Signed-off-by: Liron Himi <lironh@marvell.com>
> Reviewed-by: Liron Himi <lironh@marvell.com>
> ---
> v2:
> * include updated docs in this patch
> * add musdk version in commit message
> ---
> doc/guides/nics/mvneta.rst | 13 ++++++++-----
> doc/guides/nics/mvpp2.rst | 15 +++++++++------
> drivers/common/mvep/meson.build | 14 +++++---------
> drivers/crypto/mvsam/meson.build | 15 +++++----------
@Ahil, is it OK if I get this to the next-net, since logically related?
> drivers/net/mvneta/meson.build | 19 +++++--------------
> drivers/net/mvneta/mvneta_ethdev.h | 1 +
> drivers/net/mvpp2/meson.build | 15 +++++----------
> meson_options.txt | 2 --
> 8 files changed, 38 insertions(+), 56 deletions(-)
>
<...>
> @@ -94,7 +94,7 @@ be passed as part of EAL arguments.
> -c 3 -- -i --p 3 -a
>
>
> -Building DPDK
> +Building MUSDK
> -------------
>
This is giving doc warning because of "Title underline too short".
[L.H.] okay, will fix in v3
<...>
> @@ -108,7 +108,7 @@ Prerequisites
> DPDK environment.
>
>
> -Building DPDK
> +Building MUSDK
> -------------
>
Ditto.
[L.H.] same
<...>
> diff --git a/drivers/net/mvneta/mvneta_ethdev.h
> b/drivers/net/mvneta/mvneta_ethdev.h
> index ef8067790..e090abc25 100644
> --- a/drivers/net/mvneta/mvneta_ethdev.h
> +++ b/drivers/net/mvneta/mvneta_ethdev.h
> @@ -21,6 +21,7 @@
> #undef container_of
> #endif
>
> +#include <env/mv_autogen_comp_flags.h>
Is this include related with this patch?
[L.H.] yes, without it meson build will fail
On 12/16/2020 1:41 PM, Liron Himi wrote:
>
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, 16 December 2020 15:37
> To: Liron Himi <lironh@marvell.com>
> Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
>
> External Email
>
> ----------------------------------------------------------------------
> On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
>> From: Liron Himi <lironh@marvell.com>
>>
>> With pkg-config support available within musdk library (from
>> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
>> can be removed.
>> PKG_CONFIG_PATH environment variable should be set appropriately to
>> use the musdk library.
>
> Hi Liron,
>
> It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
> [L.H.] yes, it can be backported.
>
>>
>> docs are updated with new musdk version and meson instructions.
>>
>> Signed-off-by: Liron Himi <lironh@marvell.com>
>> Reviewed-by: Liron Himi <lironh@marvell.com>
>> ---
>> v2:
>> * include updated docs in this patch
>> * add musdk version in commit message
>> ---
>> doc/guides/nics/mvneta.rst | 13 ++++++++-----
>> doc/guides/nics/mvpp2.rst | 15 +++++++++------
>> drivers/common/mvep/meson.build | 14 +++++---------
>> drivers/crypto/mvsam/meson.build | 15 +++++----------
>
> @Ahil, is it OK if I get this to the next-net, since logically related?
>
>> drivers/net/mvneta/meson.build | 19 +++++--------------
>> drivers/net/mvneta/mvneta_ethdev.h | 1 +
>> drivers/net/mvpp2/meson.build | 15 +++++----------
>> meson_options.txt | 2 --
>> 8 files changed, 38 insertions(+), 56 deletions(-)
>>
>
> <...>
>
>> @@ -94,7 +94,7 @@ be passed as part of EAL arguments.
>> -c 3 -- -i --p 3 -a
>>
>>
>> -Building DPDK
>> +Building MUSDK
>> -------------
>>
>
> This is giving doc warning because of "Title underline too short".
> [L.H.] okay, will fix in v3
>
> <...>
>
>> @@ -108,7 +108,7 @@ Prerequisites
>> DPDK environment.
>>
>>
>> -Building DPDK
>> +Building MUSDK
>> -------------
>>
>
> Ditto.
> [L.H.] same
>
> <...>
>
>> diff --git a/drivers/net/mvneta/mvneta_ethdev.h
>> b/drivers/net/mvneta/mvneta_ethdev.h
>> index ef8067790..e090abc25 100644
>> --- a/drivers/net/mvneta/mvneta_ethdev.h
>> +++ b/drivers/net/mvneta/mvneta_ethdev.h
>> @@ -21,6 +21,7 @@
>> #undef container_of
>> #endif
>>
>> +#include <env/mv_autogen_comp_flags.h>
>
> Is this include related with this patch?
> [L.H.] yes, without it meson build will fail
>
There is no change in the code, how it was working before but failing now? Can
you please give more details why it is needed?
On 12/16/2020 1:41 PM, Liron Himi wrote:
>
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, 16 December 2020 15:37
> To: Liron Himi <lironh@marvell.com>
> Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
>
> External Email
>
> ----------------------------------------------------------------------
> On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
>> From: Liron Himi <lironh@marvell.com>
>>
>> With pkg-config support available within musdk library (from
>> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
>> can be removed.
>> PKG_CONFIG_PATH environment variable should be set appropriately to
>> use the musdk library.
>
> Hi Liron,
>
> It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
> [L.H.] yes, it can be backported.
>
Kevin, Luca,
What do you think about backporting this patch to 19.11 & 20.11, it removes
'lib_musdk_dir' custom meson config option and uses pkg-config to find the musdk
libraries.
It looks good change but not sure if it is a regression to remove a build option.
Thanks,
ferruh
-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com>
Sent: Wednesday, 16 December 2020 15:49
To: Liron Himi <lironh@marvell.com>
Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
Subject: Re: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
On 12/16/2020 1:41 PM, Liron Himi wrote:
>
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, 16 December 2020 15:37
> To: Liron Himi <lironh@marvell.com>
> Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor
> <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada
> drivers
>
> External Email
>
> ----------------------------------------------------------------------
> On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
>> From: Liron Himi <lironh@marvell.com>
>>
>> With pkg-config support available within musdk library (from
>> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
>> can be removed.
>> PKG_CONFIG_PATH environment variable should be set appropriately to
>> use the musdk library.
>
> Hi Liron,
>
> It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
> [L.H.] yes, it can be backported.
>
>>
>> docs are updated with new musdk version and meson instructions.
>>
>> Signed-off-by: Liron Himi <lironh@marvell.com>
>> Reviewed-by: Liron Himi <lironh@marvell.com>
>> ---
>> v2:
>> * include updated docs in this patch
>> * add musdk version in commit message
>> ---
>> doc/guides/nics/mvneta.rst | 13 ++++++++-----
>> doc/guides/nics/mvpp2.rst | 15 +++++++++------
>> drivers/common/mvep/meson.build | 14 +++++---------
>> drivers/crypto/mvsam/meson.build | 15 +++++----------
>
> @Ahil, is it OK if I get this to the next-net, since logically related?
>
>> drivers/net/mvneta/meson.build | 19 +++++--------------
>> drivers/net/mvneta/mvneta_ethdev.h | 1 +
>> drivers/net/mvpp2/meson.build | 15 +++++----------
>> meson_options.txt | 2 --
>> 8 files changed, 38 insertions(+), 56 deletions(-)
>>
>
> <...>
>
>> @@ -94,7 +94,7 @@ be passed as part of EAL arguments.
>> -c 3 -- -i --p 3 -a
>>
>>
>> -Building DPDK
>> +Building MUSDK
>> -------------
>>
>
> This is giving doc warning because of "Title underline too short".
> [L.H.] okay, will fix in v3
>
> <...>
>
>> @@ -108,7 +108,7 @@ Prerequisites
>> DPDK environment.
>>
>>
>> -Building DPDK
>> +Building MUSDK
>> -------------
>>
>
> Ditto.
> [L.H.] same
>
> <...>
>
>> diff --git a/drivers/net/mvneta/mvneta_ethdev.h
>> b/drivers/net/mvneta/mvneta_ethdev.h
>> index ef8067790..e090abc25 100644
>> --- a/drivers/net/mvneta/mvneta_ethdev.h
>> +++ b/drivers/net/mvneta/mvneta_ethdev.h
>> @@ -21,6 +21,7 @@
>> #undef container_of
>> #endif
>>
>> +#include <env/mv_autogen_comp_flags.h>
>
> Is this include related with this patch?
> [L.H.] yes, without it meson build will fail
>
There is no change in the code, how it was working before but failing now? Can you please give more details why it is needed?
[L.H.] I have updated the musdk pkg-config, so this change is not needed. Will be removed in v3
On Wed, 2020-12-16 at 13:52 +0000, Ferruh Yigit wrote:
> On 12/16/2020 1:41 PM, Liron Himi wrote:
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > Sent: Wednesday, 16 December 2020 15:37
> > To: Liron Himi <lironh@marvell.com>
> > Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
> > Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
> > > From: Liron Himi <lironh@marvell.com>
> > >
> > > With pkg-config support available within musdk library (from
> > > musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> > > can be removed.
> > > PKG_CONFIG_PATH environment variable should be set appropriately to
> > > use the musdk library.
> >
> > Hi Liron,
> >
> > It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
> > [L.H.] yes, it can be backported.
> >
>
> Kevin, Luca,
>
> What do you think about backporting this patch to 19.11 & 20.11, it removes
> 'lib_musdk_dir' custom meson config option and uses pkg-config to find the musdk
> libraries.
>
> It looks good change but not sure if it is a regression to remove a build option.
>
> Thanks,
> ferruh
I don't know how used it is, but removing a meson_option is no good for
LTS. If there is no functionality/build breakage and it's 100%
compatible, it could be made a no-op - that would be acceptable for me.
On 12/17/2020 10:06 AM, Luca Boccassi wrote:
> On Wed, 2020-12-16 at 13:52 +0000, Ferruh Yigit wrote:
>> On 12/16/2020 1:41 PM, Liron Himi wrote:
>>> -----Original Message-----
>>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>>> Sent: Wednesday, 16 December 2020 15:37
>>> To: Liron Himi <lironh@marvell.com>
>>> Cc: dev@dpdk.org; Luca Boccassi <bluca@debian.org>; Kevin Traynor <ktraynor@redhat.com>; Akhil Goyal <akhil.goyal@nxp.com>
>>> Subject: [EXT] Re: [PATCH v2] meson: update meson build for armada drivers
>>>
>>> External Email
>>>
>>> ----------------------------------------------------------------------
>>> On 12/15/2020 10:23 PM, lironh@marvell.com wrote:
>>>> From: Liron Himi <lironh@marvell.com>
>>>>
>>>> With pkg-config support available within musdk library (from
>>>> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
>>>> can be removed.
>>>> PKG_CONFIG_PATH environment variable should be set appropriately to
>>>> use the musdk library.
>>>
>>> Hi Liron,
>>>
>>> It is good change to get rid of an custom meson option, can we or should we backport this to the v20.11?
>>> [L.H.] yes, it can be backported.
>>>
>>
>> Kevin, Luca,
>>
>> What do you think about backporting this patch to 19.11 & 20.11, it removes
>> 'lib_musdk_dir' custom meson config option and uses pkg-config to find the musdk
>> libraries.
>>
>> It looks good change but not sure if it is a regression to remove a build option.
>>
>> Thanks,
>> ferruh
>
> I don't know how used it is, but removing a meson_option is no good for
> LTS. If there is no functionality/build breakage and it's 100%
> compatible, it could be made a no-op - that would be acceptable for me.
>
It may affect the ones using 'lib_musdk_dir' meson config, if the removing a
meson_option is not wanted, perhaps better to not backport this. Thanks.
@@ -56,7 +56,7 @@ Prerequisites
.. code-block:: console
- git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09
+ git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
MUSDK is a light-weight library that provides direct access to Marvell's
NETA. Alternatively prebuilt MUSDK library can be
@@ -94,7 +94,7 @@ be passed as part of EAL arguments.
-c 3 -- -i --p 3 -a
-Building DPDK
+Building MUSDK
-------------
Driver needs precompiled MUSDK library during compilation.
@@ -109,12 +109,15 @@ Driver needs precompiled MUSDK library during compilation.
MUSDK will be installed to `usr/local` under current directory.
For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
-The path to the MUSDK installation directory needs to set in meson, shown in the
-following command:
+Building DPDK:
+
+Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
.. code-block:: console
- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build
+ export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
+ meson build --cross-file config/arm/arm64_armada_linux_gcc
+ ninja -C build
Usage Example
@@ -91,7 +91,7 @@ Prerequisites
.. code-block:: console
- git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09
+ git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
MUSDK is a light-weight library that provides direct access to Marvell's
PPv2 (Packet Processor v2). Alternatively prebuilt MUSDK library can be
@@ -108,7 +108,7 @@ Prerequisites
DPDK environment.
-Building DPDK
+Building MUSDK
-------------
Driver needs precompiled MUSDK library during compilation.
@@ -123,14 +123,17 @@ Driver needs precompiled MUSDK library during compilation.
MUSDK will be installed to `usr/local` under current directory.
For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
-The path to the MUSDK installation directory needs to set in meson, shown in the
-command below.
-For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`.
+Building DPDK:
+
+Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
.. code-block:: console
- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build
+ export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
+
+ meson build --cross-file config/arm/arm64_armada_linux_gcc
+ ninja -C build
Usage Example
@@ -3,18 +3,14 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
#
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files('mvep_common.c')
@@ -3,20 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c')
deps += ['bus_vdev', 'common_mvep']
@@ -3,24 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += [
- '-DMVCONF_TYPES_PUBLIC',
- '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC',
- '-DMVCONF_DMA_PHYS_ADDR_T_SIZE=64'
- ]
+ subdir_done()
endif
+ext_deps += dep
+
sources = files(
'mvneta_ethdev.c',
'mvneta_rxtx.c'
@@ -21,6 +21,7 @@
#undef container_of
#endif
+#include <env/mv_autogen_comp_flags.h>
#include <drivers/mv_neta.h>
#include <drivers/mv_neta_ppio.h>
@@ -3,20 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files(
'mrvl_ethdev.c',
'mrvl_flow.c',
@@ -20,8 +20,6 @@ option('include_subdir_arch', type: 'string', value: '',
description: 'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '',
description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.')
-option('lib_musdk_dir', type: 'string', value: '',
- description: 'path to the MUSDK library installation directory')
option('machine', type: 'string', value: 'native',
description: 'set the target machine type')
option('max_ethports', type: 'integer', value: 32,