1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright 2019 Mellanox Technologies, Ltd 3 4if not is_linux 5 build = false 6 reason = 'only supported on Linux' 7 subdir_done() 8endif 9 10config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON' 11driver_name_fmt = 'rte_common_@0@' 12deps += ['hash', 'pci', 'bus_pci', 'net', 'eal', 'kvargs'] 13sources += files( 14 'mlx5_devx_cmds.c', 15 'mlx5_common.c', 16 'mlx5_common_mp.c', 17 'mlx5_common_mr.c', 18 'mlx5_malloc.c', 19 'mlx5_common_pci.c', 20) 21 22cflags_options = [ 23 '-std=c11', 24 '-Wno-strict-prototypes', 25 '-D_BSD_SOURCE', 26 '-D_DEFAULT_SOURCE', 27 '-D_XOPEN_SOURCE=600' 28] 29foreach option:cflags_options 30 if cc.has_argument(option) 31 cflags += option 32 endif 33endforeach 34if get_option('buildtype').contains('debug') 35 cflags += [ '-pedantic', '-DPEDANTIC' ] 36else 37 cflags += [ '-UPEDANTIC' ] 38endif 39 40subdir(exec_env) 41