17b4f1e6bSMatan Azrad# SPDX-License-Identifier: BSD-3-Clause 27b4f1e6bSMatan Azrad# Copyright 2019 Mellanox Technologies, Ltd 37b4f1e6bSMatan Azrad 48ce24f0cSThomas Monjalonif not (is_linux or is_windows) 57b4f1e6bSMatan Azrad build = false 68ce24f0cSThomas Monjalon reason = 'only supported on Linux and Windows' 78ce24f0cSThomas Monjalon subdir_done() 88ce24f0cSThomas Monjalonendif 98ce24f0cSThomas Monjalonif is_windows and not is_ms_linker and not meson.is_cross_build() 108ce24f0cSThomas Monjalon build = false 118ce24f0cSThomas Monjalon reason = 'MinGW is supported only for cross-compilation test' 127b4f1e6bSMatan Azrad subdir_done() 137b4f1e6bSMatan Azradendif 147b4f1e6bSMatan Azrad 15777b72a9SXueming Lideps += ['hash', 'pci', 'bus_pci', 'bus_auxiliary', 'net', 'eal', 'kvargs'] 1672f75660SOphir Munksources += files( 177b4f1e6bSMatan Azrad 'mlx5_devx_cmds.c', 187b4f1e6bSMatan Azrad 'mlx5_common.c', 19a4de9586SVu Pham 'mlx5_common_mp.c', 20b8dc6b0eSVu Pham 'mlx5_common_mr.c', 21d38e3d52SSuanming Mou 'mlx5_malloc.c', 228a41f4deSParav Pandit 'mlx5_common_pci.c', 239dab4d62SMichael Baum 'mlx5_common_devx.c', 2425245d5dSShiri Kuzin 'mlx5_common_utils.c', 257b4f1e6bSMatan Azrad) 2672f75660SOphir Munk 277b4f1e6bSMatan Azradcflags_options = [ 287b4f1e6bSMatan Azrad '-std=c11', 297b4f1e6bSMatan Azrad '-Wno-strict-prototypes', 307b4f1e6bSMatan Azrad '-D_BSD_SOURCE', 317b4f1e6bSMatan Azrad '-D_DEFAULT_SOURCE', 327d5cfaa7SBruce Richardson '-D_XOPEN_SOURCE=600', 337b4f1e6bSMatan Azrad] 347b4f1e6bSMatan Azradforeach option:cflags_options 357b4f1e6bSMatan Azrad if cc.has_argument(option) 367b4f1e6bSMatan Azrad cflags += option 377b4f1e6bSMatan Azrad endif 387b4f1e6bSMatan Azradendforeach 397b4f1e6bSMatan Azradif get_option('buildtype').contains('debug') 400afacb04SAlexander Kozyrev cflags += [ '-pedantic', '-DPEDANTIC' ] 417b4f1e6bSMatan Azradelse 420afacb04SAlexander Kozyrev cflags += [ '-UPEDANTIC' ] 437b4f1e6bSMatan Azradendif 4479ece364SThomas Monjalon 45*b6883b9cSViacheslav Ovsiienkorequire_iova_in_mbuf = false 46*b6883b9cSViacheslav Ovsiienko 47487599f1SThomas Monjalonmlx5_config = configuration_data() 4872f75660SOphir Munksubdir(exec_env) 49487599f1SThomas Monjalonconfigure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config) 5070cc4e1fSDavid Marchand 5170cc4e1fSDavid Marchandannotate_locks = false 52