xref: /dpdk/app/meson.build (revision 7564d550)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2017-2019 Intel Corporation
3
4if is_windows
5	subdir_done()
6endif
7
8apps = [
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
23lib_execinfo = cc.find_library('execinfo', required: false)
24
25default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
26
27foreach app:apps
28	build = true
29	name = app
30	sources = []
31	includes = []
32	cflags = default_cflags
33	objs = [] # other object files to link against, used e.g. for
34	          # instruction-set optimized versions of code
35
36	# use "deps" for internal DPDK dependencies, and "ext_deps" for
37	# external package/library requirements
38	ext_deps = []
39	deps = dpdk_app_link_libraries
40
41	subdir(name)
42
43	if build
44		dep_objs = []
45		foreach d:deps
46			dep_objs += get_variable(get_option('default_library')
47				 + '_rte_' + d)
48		endforeach
49		dep_objs += lib_execinfo
50
51		link_libs = []
52		if get_option('default_library') == 'static'
53			link_libs = dpdk_static_libraries + dpdk_drivers
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
65endforeach
66
67# special case the autotests
68subdir('test')
69