f-stack/dpdk/app/meson.build

81 lines
2.0 KiB
Meson
Raw Normal View History

2019-06-25 11:12:58 +00:00
# SPDX-License-Identifier: BSD-3-Clause
2020-06-18 16:55:50 +00:00
# Copyright(c) 2017-2019 Intel Corporation
2019-06-25 11:12:58 +00:00
2020-06-18 16:55:50 +00:00
apps = [
2022-09-06 04:00:10 +00:00
'dumpcap',
'pdump',
'proc-info',
'test-acl',
'test-bbdev',
'test-cmdline',
'test-compress-perf',
'test-crypto-perf',
'test-eventdev',
'test-fib',
'test-flow-perf',
'test-gpudev',
'test-pipeline',
'test-pmd',
'test-regex',
'test-sad',
]
2019-06-25 11:12:58 +00:00
2021-02-05 08:48:47 +00:00
default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
2022-09-02 04:40:05 +00:00
default_ldflags = []
if get_option('default_library') == 'static' and not is_windows
2022-09-06 04:00:10 +00:00
default_ldflags += ['-Wl,--export-dynamic']
2022-09-02 04:40:05 +00:00
endif
2019-06-25 11:12:58 +00:00
foreach app:apps
2022-09-06 04:00:10 +00:00
build = true
name = app
sources = []
includes = []
cflags = default_cflags
ldflags = default_ldflags
objs = [] # other object files to link against, used e.g. for
# instruction-set optimized versions of code
# use "deps" for internal DPDK dependencies, and "ext_deps" for
# external package/library requirements
ext_deps = []
deps = []
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
subdir(name)
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
if build
dep_objs = []
foreach d:deps
var_name = get_option('default_library') + '_rte_' + d
if not is_variable(var_name)
build = false
message('Missing dependency "@0@" for app "@1@"'.format(d, name))
break
endif
dep_objs += [get_variable(var_name)]
endforeach
endif
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
if not build
continue
endif
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
link_libs = []
if get_option('default_library') == 'static'
link_libs = dpdk_static_libraries + dpdk_drivers
endif
2019-06-25 11:12:58 +00:00
2022-09-06 04:00:10 +00:00
executable('dpdk-' + name,
sources,
c_args: cflags,
link_args: ldflags,
link_whole: link_libs,
dependencies: ext_deps + dep_objs,
include_directories: includes,
install_rpath: join_paths(get_option('prefix'), driver_install_path),
install: true)
2019-06-25 11:12:58 +00:00
endforeach
2020-06-18 16:55:50 +00:00
# special case the autotests
subdir('test')