1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright 2019 Mellanox Technologies, Ltd 3 4if not (is_linux or is_windows) 5 build = false 6 reason = 'only supported on Linux and Windows' 7 subdir_done() 8endif 9if is_windows and not is_ms_linker and not meson.is_cross_build() 10 build = false 11 reason = 'MinGW is supported only for cross-compilation test' 12 subdir_done() 13endif 14 15deps += ['hash', 'pci', 'bus_pci', 'bus_auxiliary', 'net', 'eal', 'kvargs'] 16sources += files( 17 'mlx5_devx_cmds.c', 18 'mlx5_common.c', 19 'mlx5_common_mp.c', 20 'mlx5_common_mr.c', 21 'mlx5_malloc.c', 22 'mlx5_common_pci.c', 23 'mlx5_common_devx.c', 24 'mlx5_common_utils.c', 25) 26 27cflags_options = [ 28 '-std=c11', 29 '-Wno-strict-prototypes', 30 '-D_BSD_SOURCE', 31 '-D_DEFAULT_SOURCE', 32 '-D_XOPEN_SOURCE=600', 33] 34foreach option:cflags_options 35 if cc.has_argument(option) 36 cflags += option 37 endif 38endforeach 39if get_option('buildtype').contains('debug') 40 cflags += [ '-pedantic', '-DPEDANTIC' ] 41else 42 cflags += [ '-UPEDANTIC' ] 43endif 44 45require_iova_in_mbuf = false 46 47mlx5_config = configuration_data() 48subdir(exec_env) 49configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config) 50 51annotate_locks = false 52