xref: /dpdk/drivers/common/mlx5/windows/meson.build (revision 85c51a4ffab8ce294f09419f6b8fc9968466b7a0)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright 2019 Mellanox Technologies, Ltd
3
4if not cc.has_header('mlx5devx.h')
5    build = false
6    reason = 'missing dependency, "mlx5devx.h"'
7    subdir_done()
8endif
9
10devxlib = cc.find_library('mlx5devx', required: true)
11if not devxlib.found()
12    build = false
13    reason = 'missing dependency, "mlx5devx"'
14    subdir_done()
15endif
16ext_deps += devxlib
17
18includes += include_directories('.')
19
20sources += files(
21        'mlx5_glue.c',
22        'mlx5_common_os.c',
23)
24
25cflags_options = [
26        '-std=c11',
27        '-Wno-strict-prototypes',
28        '-D_BSD_SOURCE',
29        '-D_DEFAULT_SOURCE',
30        '-D_XOPEN_SOURCE=600',
31]
32foreach option:cflags_options
33    if cc.has_argument(option)
34        cflags += option
35    endif
36endforeach
37if get_option('buildtype').contains('debug')
38    cflags += [ '-pedantic', '-DPEDANTIC' ]
39else
40    cflags += [ '-UPEDANTIC' ]
41endif
42