aada0b560168c6d173feeec1b81da697f9551272
[dpdk.git] / drivers / regex / octeontx2 / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(C) 2020 Marvell International Ltd.
3 #
4
5 if not is_linux
6         build = false
7         reason = 'only supported on Linux'
8 endif
9
10 lib = cc.find_library('librxp_compiler', required: false)
11 if lib.found()
12         ext_deps += lib
13         ext_deps += cc.find_library('libstdc++', required: true)
14         includes += include_directories(inc_dir)
15         cflags += ['-DREE_COMPILER_SDK']
16 endif
17
18 sources = files('otx2_regexdev.c',
19                 'otx2_regexdev_hw_access.c',
20                 'otx2_regexdev_mbox.c',
21                 'otx2_regexdev_compiler.c'
22                 )
23
24 extra_flags = []
25 # This integrated controller runs only on a arm64 machine, remove 32bit warnings
26 if not dpdk_conf.get('RTE_ARCH_64')
27         extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']
28 endif
29
30 # for clang 32-bit compiles we need libatomic for 64-bit atomic ops
31 if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
32         ext_deps += cc.find_library('atomic')
33 endif
34
35 foreach flag: extra_flags
36         if cc.has_argument(flag)
37                 cflags += flag
38         endif
39 endforeach
40
41 fmt_name = 'octeontx2_regex'
42 deps += ['bus_pci', 'common_octeontx2', 'regexdev']
43
44 includes += include_directories('../../common/octeontx2')