f-stack/dpdk/buildtools/subproject/meson.build

27 lines
1.0 KiB
Meson
Raw Normal View History

2023-09-13 12:21:49 +00:00
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2022 Intel Corporation
message('DPDK subproject linking: ' + get_option('default_library'))
2024-10-17 10:26:34 +00:00
subproject_cflags = ['-include', 'rte_config.h'] + machine_args
if is_freebsd
subproject_cflags += ['-D__BSD_VISIBLE']
endif
2023-09-13 12:21:49 +00:00
if get_option('default_library') == 'static'
dpdk_dep = declare_dependency(
version: meson.project_version(),
dependencies: dpdk_static_lib_deps,
2024-10-17 10:26:34 +00:00
compile_args: subproject_cflags,
2023-09-13 12:21:49 +00:00
# static library deps in DPDK build don't include "link_with" parameters,
# so explicitly link-in both libs and drivers
2024-10-17 10:26:34 +00:00
link_whole: dpdk_static_libraries + dpdk_drivers,
2023-09-13 12:21:49 +00:00
link_args: dpdk_extra_ldflags)
else
dpdk_dep = declare_dependency(
version: meson.project_version(),
2024-10-17 10:26:34 +00:00
compile_args: subproject_cflags,
2023-09-13 12:21:49 +00:00
# shared library deps include all necessary linking parameters
dependencies: dpdk_shared_lib_deps)
endif
libdpdk_dep = dpdk_dep