doc: remove obsolete option from bnxt guide
[dpdk.git] / drivers / common / qat / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2018 Intel Corporation
3
4 if is_windows
5     build = false
6     reason = 'not supported on Windows'
7     subdir_done()
8 endif
9
10 qat_crypto = true
11 qat_crypto_path = 'crypto/qat'
12 qat_crypto_relpath = '../../' + qat_crypto_path
13 qat_compress = true
14 qat_compress_path = 'compress/qat'
15 qat_compress_relpath = '../../' + qat_compress_path
16
17 if disable_drivers.contains(qat_crypto_path)
18     qat_crypto = false
19     dpdk_drvs_disabled += qat_crypto_path
20     set_variable(qat_crypto_path.underscorify() + '_disable_reason',
21             'Explicitly disabled via build config')
22 endif
23 if disable_drivers.contains(qat_compress_path)
24     qat_compress = false
25     dpdk_drvs_disabled += qat_compress_path
26     set_variable(qat_compress_path.underscorify() + '_disable_reason',
27             'Explicitly disabled via build config')
28 endif
29
30 libcrypto = dependency('libcrypto', required: false, method: 'pkg-config')
31 if qat_crypto and not libcrypto.found()
32     qat_crypto = false
33     dpdk_drvs_disabled += qat_crypto_path
34     set_variable(qat_crypto_path.underscorify() + '_disable_reason',
35             'missing dependency, libcrypto')
36 endif
37
38 # The driver should not build if both compression and crypto are disabled
39 #FIXME common code depends on compression files so check only compress!
40 if not qat_compress # and not qat_crypto
41     build = false
42     reason = '' # rely on reason for compress/crypto above
43     subdir_done()
44 endif
45
46 deps += ['bus_pci', 'cryptodev', 'net', 'compressdev']
47 sources += files(
48         'qat_common.c',
49         'qat_qp.c',
50         'qat_device.c',
51         'qat_logs.c',
52         'qat_pf2vf.c',
53 )
54 includes += include_directories(
55         'qat_adf',
56         qat_crypto_relpath,
57         qat_compress_relpath,
58 )
59
60 if qat_compress
61     foreach f: ['qat_comp_pmd.c', 'qat_comp.c']
62         sources += files(join_paths(qat_compress_relpath, f))
63     endforeach
64 endif
65
66 if qat_crypto
67     foreach f: ['qat_sym_pmd.c', 'qat_sym.c', 'qat_sym_session.c',
68             'qat_sym_hw_dp.c', 'qat_asym_pmd.c', 'qat_asym.c']
69         sources += files(join_paths(qat_crypto_relpath, f))
70     endforeach
71     deps += ['security']
72     ext_deps += libcrypto
73     cflags += ['-DBUILD_QAT_SYM', '-DBUILD_QAT_ASYM']
74 endif