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