f-stack/dpdk/drivers/common/mlx5/meson.build

48 lines
1.2 KiB
Meson
Raw Normal View History

2021-02-05 08:48:47 +00:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2019 Mellanox Technologies, Ltd
2023-09-11 06:58:14 +00:00
if not (is_linux or is_windows)
2022-09-06 04:00:10 +00:00
build = false
2023-09-11 06:58:14 +00:00
reason = 'only supported on Linux and Windows'
subdir_done()
endif
if is_windows and not is_ms_linker and not meson.is_cross_build()
build = false
reason = 'MinGW is supported only for cross-compilation test'
2022-09-06 04:00:10 +00:00
subdir_done()
2021-02-05 08:48:47 +00:00
endif
2022-09-06 04:00:10 +00:00
deps += ['hash', 'pci', 'bus_pci', 'bus_auxiliary', 'net', 'eal', 'kvargs']
2021-02-05 08:48:47 +00:00
sources += files(
2022-09-06 04:00:10 +00:00
'mlx5_devx_cmds.c',
'mlx5_common.c',
'mlx5_common_mp.c',
'mlx5_common_mr.c',
'mlx5_malloc.c',
'mlx5_common_pci.c',
'mlx5_common_devx.c',
'mlx5_common_utils.c',
2021-02-05 08:48:47 +00:00
)
cflags_options = [
2022-09-06 04:00:10 +00:00
'-std=c11',
'-Wno-strict-prototypes',
'-D_BSD_SOURCE',
'-D_DEFAULT_SOURCE',
'-D_XOPEN_SOURCE=600',
2021-02-05 08:48:47 +00:00
]
foreach option:cflags_options
2022-09-06 04:00:10 +00:00
if cc.has_argument(option)
cflags += option
endif
2021-02-05 08:48:47 +00:00
endforeach
if get_option('buildtype').contains('debug')
2022-09-06 04:00:10 +00:00
cflags += [ '-pedantic', '-DPEDANTIC' ]
2021-02-05 08:48:47 +00:00
else
2022-09-06 04:00:10 +00:00
cflags += [ '-UPEDANTIC' ]
2021-02-05 08:48:47 +00:00
endif
2023-09-13 12:21:49 +00:00
mlx5_config = configuration_data()
2021-02-05 08:48:47 +00:00
subdir(exec_env)
2023-09-13 12:21:49 +00:00
configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config)