4fb0d0ac119022f82d9bd5147b07a33865b7125c
[dpdk.git] / drivers / net / sfc / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 #
3 # Copyright (c) 2016-2018 Solarflare Communications Inc.
4 # All rights reserved.
5 #
6 # This software was jointly developed between OKTET Labs (under contract
7 # for Solarflare) and Solarflare Communications, Inc.
8
9 if arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')
10         build = false
11         reason = 'only supported on x86_64'
12 endif
13
14 allow_experimental_apis = true
15
16 extra_flags = []
17
18 # Strict-aliasing rules are violated by rte_eth_link to uint64_t casts
19 extra_flags += '-Wno-strict-aliasing'
20
21 # Enable more warnings
22 extra_flags += [
23         '-Wextra',
24         '-Wdisabled-optimization'
25 ]
26
27 # Compiler and version dependent flags
28 extra_flags += [
29         '-Waggregate-return',
30         '-Wnested-externs',
31         '-Wbad-function-cast'
32 ]
33
34 foreach flag: extra_flags
35         if cc.has_argument(flag)
36                 cflags += flag
37         endif
38 endforeach
39
40 subdir('base')
41 objs = [base_objs]
42
43 sources = files(
44         'sfc_ethdev.c',
45         'sfc_kvargs.c',
46         'sfc.c',
47         'sfc_mcdi.c',
48         'sfc_intr.c',
49         'sfc_ev.c',
50         'sfc_port.c',
51         'sfc_rx.c',
52         'sfc_tx.c',
53         'sfc_tso.c',
54         'sfc_filter.c',
55         'sfc_flow.c',
56         'sfc_dp.c',
57         'sfc_ef10_rx.c',
58         'sfc_ef10_essb_rx.c',
59         'sfc_ef10_tx.c'
60 )
61
62 includes += include_directories('base')