build: replace license text with SPDX tag
[dpdk.git] / app / test-pmd / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
3
4 sources = files('cmdline.c',
5         'cmdline_flow.c',
6         'cmdline_mtr.c',
7         'cmdline_tm.c',
8         'config.c',
9         'csumonly.c',
10         'flowgen.c',
11         'icmpecho.c',
12         'ieee1588fwd.c',
13         'iofwd.c',
14         'macfwd.c',
15         'macswap.c',
16         'parameters.c',
17         'rxonly.c',
18         'testpmd.c',
19         'txonly.c')
20
21 deps = ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
22 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
23         deps += 'pdump'
24 endif
25 if dpdk_conf.has('RTE_LIBRTE_I40E_PMD')
26         deps += 'pmd_i40e'
27 endif
28 if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
29         deps += 'pmd_ixgbe'
30 endif
31 if dpdk_conf.has('RTE_LIBRTE_SOFTNIC_PMD')
32         sources += files('tm.c')
33         deps += 'pmd_softnic'
34 endif
35
36 dep_objs = []
37 foreach d:deps
38         dep_objs += get_variable(get_option('default_library') + '_rte_' + d)
39 endforeach
40
41 link_libs = []
42 if get_option('default_library') == 'static'
43         link_libs = dpdk_drivers
44 endif
45
46 executable('dpdk-testpmd',
47         sources,
48         c_args: '-DALLOW_EXPERIMENTAL_API',
49         link_whole: link_libs,
50         dependencies: dep_objs,
51         install_rpath: join_paths(get_option('prefix'), driver_install_path),
52         install: true)