1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2019 Mellanox Technologies, Ltd
4 includes += include_directories('.')
11 res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])', check: false)
12 res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])', check: false)
14 if (res_lib.returncode() != 0 or res_inc.returncode() != 0)
16 reason = 'DevX environment variables are not set, DEVX_LIB_PATH and DEVX_INC_PATH vars must be exported'
20 devx_lib_dir = res_lib.stdout().strip()
21 devx_inc_dir = res_inc.stdout().strip()
23 ext_deps += cc.find_library('mlx5devx', dirs: devx_lib_dir, required: true)
24 includes += include_directories(devx_inc_dir)
27 '-Wno-strict-prototypes',
30 '-D_XOPEN_SOURCE=600',
32 foreach option:cflags_options
33 if cc.has_argument(option)
37 if get_option('buildtype').contains('debug')
38 cflags += [ '-pedantic', '-DPEDANTIC' ]
40 cflags += [ '-UPEDANTIC' ]
43 # Generate an empty mlx5_autoconf.h file for compatibility with Linux
44 config = configuration_data()
45 configure_file(output : 'mlx5_autoconf.h', configuration : config)