[v3,2/5] crypto/armv8: enable meson build

Message ID 20200123034557.146822-3-ruifeng.wang@arm.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series armv8 crypto PMD update |

Checks

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

Commit Message

Ruifeng Wang Jan. 23, 2020, 3:45 a.m. UTC
  From: Dharmik Thakkar <dharmik.thakkar@arm.com>

Add new meson.build file for crypto/armv8

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/crypto/armv8/meson.build | 25 +++++++++++++++++++++++++
 drivers/crypto/meson.build       |  1 +
 meson_options.txt                |  2 ++
 3 files changed, 28 insertions(+)
 create mode 100644 drivers/crypto/armv8/meson.build
  

Patch

diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build
new file mode 100644
index 000000000..6ecb78b42
--- /dev/null
+++ b/drivers/crypto/armv8/meson.build
@@ -0,0 +1,25 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Arm Limited
+
+path = get_option('armv8_crypto_dir')
+if path == ''
+	build = false
+	reason = 'missing dependency, "armv8_crypto"'
+	subdir_done()
+endif
+
+inc_dir = path
+
+lib = cc.find_library('libAArch64crypto', dirs: [path], required: false)
+if not lib.found()
+	build = false
+	reason = 'missing dependency, "AArch64crypto"'
+	subdir_done()
+else
+	ext_deps += lib
+	includes += include_directories(inc_dir)
+endif
+
+deps += ['bus_vdev']
+sources = files('rte_armv8_pmd.c', 'rte_armv8_pmd_ops.c')
+allow_experimental_apis = true
diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index 229debdfe..7fa1fbe26 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -3,6 +3,7 @@ 
 
 drivers = ['aesni_gcm',
 	   'aesni_mb',
+	   'armv8',
 	   'caam_jr',
 	   'ccp',
 	   'dpaa_sec',
diff --git a/meson_options.txt b/meson_options.txt
index 53dfe13c3..20be15fe6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,7 @@ 
 # Please keep these options sorted alphabetically.
 
+option('armv8_crypto_dir', type: 'string', value: '',
+	description: 'path to the armv8_crypto library installation directory')
 option('disable_drivers', type: 'string', value: '',
 	description: 'Comma-separated list of drivers to explicitly disable.')
 option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',