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 10fmt_name = 'mlx5_vdpa' 11deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched'] 12sources = files( 13 'mlx5_vdpa.c', 14 'mlx5_vdpa_mem.c', 15 'mlx5_vdpa_event.c', 16 'mlx5_vdpa_virtq.c', 17 'mlx5_vdpa_steer.c', 18 'mlx5_vdpa_lm.c', 19) 20cflags_options = [ 21 '-std=c11', 22 '-Wno-strict-prototypes', 23 '-D_BSD_SOURCE', 24 '-D_DEFAULT_SOURCE', 25 '-D_XOPEN_SOURCE=600' 26] 27foreach option:cflags_options 28 if cc.has_argument(option) 29 cflags += option 30 endif 31endforeach 32 33if get_option('buildtype').contains('debug') 34 cflags += [ '-pedantic', '-DPEDANTIC' ] 35else 36 cflags += [ '-UPEDANTIC' ] 37endif 38