1f93a605fSBruce Richardson# SPDX-License-Identifier: BSD-3-Clause 2f93a605fSBruce Richardson# Copyright(c) 2022 Intel Corporation 3f93a605fSBruce Richardson 4f93a605fSBruce Richardsonmessage('DPDK subproject linking: ' + get_option('default_library')) 53f9aa556SRobin Jarrysubproject_cflags = ['-include', 'rte_config.h'] + machine_args 63f9aa556SRobin Jarryif is_freebsd 73f9aa556SRobin Jarry subproject_cflags += ['-D__BSD_VISIBLE'] 83f9aa556SRobin Jarryendif 9f93a605fSBruce Richardsonif get_option('default_library') == 'static' 10f93a605fSBruce Richardson dpdk_dep = declare_dependency( 11f93a605fSBruce Richardson version: meson.project_version(), 12f93a605fSBruce Richardson dependencies: dpdk_static_lib_deps, 133f9aa556SRobin Jarry compile_args: subproject_cflags, 14f93a605fSBruce Richardson # static library deps in DPDK build don't include "link_with" parameters, 15f93a605fSBruce Richardson # so explicitly link-in both libs and drivers 16cafb10b3SRobin Jarry link_whole: dpdk_static_libraries + dpdk_drivers, 17f93a605fSBruce Richardson link_args: dpdk_extra_ldflags) 18f93a605fSBruce Richardsonelse 19f93a605fSBruce Richardson dpdk_dep = declare_dependency( 20f93a605fSBruce Richardson version: meson.project_version(), 213f9aa556SRobin Jarry compile_args: subproject_cflags, 22f93a605fSBruce Richardson # shared library deps include all necessary linking parameters 23f93a605fSBruce Richardson dependencies: dpdk_shared_lib_deps) 24f93a605fSBruce Richardsonendif 25f93a605fSBruce Richardson 26f93a605fSBruce Richardsonlibdpdk_dep = dpdk_dep 277d8c608fSRobin Jarry 28*672c3299SRobin Jarrymeson.override_find_program('dpdk-cmdline-gen.py', files('../dpdk-cmdline-gen.py')) 29