buildtools: support COFF in pmdinfogen
[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-flow-perf',
19         'test-pipeline',
20         'test-pmd',
21         'test-regex',
22         'test-sad']
23
24 # for BSD only
25 lib_execinfo = cc.find_library('execinfo', required: false)
26
27 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
28 default_ldflags = []
29 if get_option('default_library') == 'static' and not is_windows
30         default_ldflags += ['-Wl,--export-dynamic']
31 endif
32
33 foreach app:apps
34         build = true
35         name = app
36         sources = []
37         includes = []
38         cflags = default_cflags
39         ldflags = default_ldflags
40         objs = [] # other object files to link against, used e.g. for
41                   # instruction-set optimized versions of code
42
43         # use "deps" for internal DPDK dependencies, and "ext_deps" for
44         # external package/library requirements
45         ext_deps = []
46         deps = []
47
48         subdir(name)
49
50         if build
51                 dep_objs = []
52                 foreach d:deps
53                         dep_objs += get_variable(get_option('default_library')
54                                  + '_rte_' + d)
55                 endforeach
56                 dep_objs += lib_execinfo
57
58                 link_libs = []
59                 if get_option('default_library') == 'static'
60                         link_libs = dpdk_static_libraries + dpdk_drivers
61                 endif
62
63                 executable('dpdk-' + name,
64                                 sources,
65                                 c_args: cflags,
66                                 link_args: ldflags,
67                                 link_whole: link_libs,
68                                 dependencies: dep_objs,
69                                 include_directories: includes,
70                                 install_rpath: join_paths(get_option('prefix'),
71                                                  driver_install_path),
72                                 install: true)
73         endif
74 endforeach
75
76 # special case the autotests
77 subdir('test')