2017-12-18 15:56:25 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2019-04-02 03:54:58 +00:00
|
|
|
# Copyright(c) 2017-2019 Intel Corporation
|
|
|
|
|
2019-02-26 12:18:59 +00:00
|
|
|
apps = [
|
2021-04-20 10:22:21 +00:00
|
|
|
'pdump',
|
|
|
|
'proc-info',
|
|
|
|
'test-acl',
|
|
|
|
'test-bbdev',
|
|
|
|
'test-cmdline',
|
|
|
|
'test-compress-perf',
|
|
|
|
'test-crypto-perf',
|
|
|
|
'test-eventdev',
|
|
|
|
'test-fib',
|
|
|
|
'test-flow-perf',
|
|
|
|
'test-pipeline',
|
|
|
|
'test-pmd',
|
|
|
|
'test-regex',
|
|
|
|
'test-sad',
|
|
|
|
]
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2020-04-13 14:55:30 +00:00
|
|
|
default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
|
2020-12-18 13:14:22 +00:00
|
|
|
default_ldflags = []
|
2021-01-12 00:36:02 +00:00
|
|
|
if get_option('default_library') == 'static' and not is_windows
|
2021-04-20 10:22:21 +00:00
|
|
|
default_ldflags += ['-Wl,--export-dynamic']
|
2020-12-18 13:14:22 +00:00
|
|
|
endif
|
2018-10-04 10:20:33 +00:00
|
|
|
|
2018-02-16 16:53:34 +00:00
|
|
|
foreach app:apps
|
2021-04-20 10:22:21 +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
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2021-04-20 10:22:21 +00:00
|
|
|
# use "deps" for internal DPDK dependencies, and "ext_deps" for
|
|
|
|
# external package/library requirements
|
|
|
|
ext_deps = []
|
|
|
|
deps = []
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2021-04-20 10:22:21 +00:00
|
|
|
subdir(name)
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2021-04-20 10:22:21 +00:00
|
|
|
if not build
|
|
|
|
continue
|
|
|
|
endif
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2021-04-20 10:22:21 +00:00
|
|
|
dep_objs = []
|
|
|
|
foreach d:deps
|
|
|
|
dep_objs += get_variable(get_option('default_library') + '_rte_' + d)
|
|
|
|
endforeach
|
2018-02-16 16:53:34 +00:00
|
|
|
|
2021-04-20 10:22:21 +00:00
|
|
|
link_libs = []
|
|
|
|
if get_option('default_library') == 'static'
|
|
|
|
link_libs = dpdk_static_libraries + dpdk_drivers
|
|
|
|
endif
|
|
|
|
|
|
|
|
executable('dpdk-' + name,
|
|
|
|
sources,
|
|
|
|
c_args: cflags,
|
|
|
|
link_args: ldflags,
|
|
|
|
link_whole: link_libs,
|
|
|
|
dependencies: dep_objs,
|
|
|
|
include_directories: includes,
|
|
|
|
install_rpath: join_paths(get_option('prefix'), driver_install_path),
|
|
|
|
install: true)
|
2018-02-16 16:53:34 +00:00
|
|
|
endforeach
|
2019-02-26 12:19:03 +00:00
|
|
|
|
|
|
|
# special case the autotests
|
|
|
|
subdir('test')
|