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