app/test-fib: add in default build
[dpdk.git] / app / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2019 Intel Corporation
3
4 if is_windows
5         subdir_done()
6 endif
7
8 apps = [
9         'pdump',
10         'proc-info',
11         'test-acl',
12         'test-bbdev',
13         'test-cmdline',
14         'test-compress-perf',
15         'test-crypto-perf',
16         'test-eventdev',
17         'test-fib',
18         'test-pipeline',
19         'test-pmd',
20         'test-sad']
21
22 # for BSD only
23 lib_execinfo = cc.find_library('execinfo', required: false)
24
25 default_cflags = machine_args
26
27 foreach app:apps
28         build = true
29         name = app
30         allow_experimental_apis = false
31         sources = []
32         includes = []
33         cflags = default_cflags
34         objs = [] # other object files to link against, used e.g. for
35                   # instruction-set optimized versions of code
36
37         # use "deps" for internal DPDK dependencies, and "ext_deps" for
38         # external package/library requirements
39         ext_deps = []
40         deps = dpdk_app_link_libraries
41
42         subdir(name)
43
44         if build
45                 dep_objs = []
46                 foreach d:deps
47                         dep_objs += get_variable(get_option('default_library')
48                                  + '_rte_' + d)
49                 endforeach
50                 dep_objs += lib_execinfo
51
52                 link_libs = []
53                 if get_option('default_library') == 'static'
54                         link_libs = dpdk_static_libraries + dpdk_drivers
55                 endif
56
57                 if allow_experimental_apis
58                         cflags += '-DALLOW_EXPERIMENTAL_API'
59                 endif
60
61                 executable('dpdk-' + name,
62                                 sources,
63                                 c_args: cflags,
64                                 link_whole: link_libs,
65                                 dependencies: dep_objs,
66                                 install_rpath: join_paths(get_option('prefix'),
67                                                  driver_install_path),
68                                 install: true)
69         endif
70 endforeach
71
72 # special case the autotests
73 subdir('test')