1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2020 Intel Corporation
4 # for static builds, include the drivers as libs and we need to "whole-archive"
6 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
8 pkg = import('pkgconfig')
9 pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
11 pkg_extra_cflags += ['-D__BSD_VISIBLE']
13 pkg.generate(name: meson.project_name(),
14 filebase: 'lib' + meson.project_name().to_lower(),
15 version: meson.project_version(),
16 libraries: dpdk_libraries,
17 libraries_private: dpdk_drivers + dpdk_static_libraries +
18 ['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
19 requires: libbsd, # apps using rte_string_fns.h may need this if enabled
20 # if libbsd is not enabled, then this is blank
21 description: '''The Data Plane Development Kit (DPDK).
22 Note that CFLAGS might contain an -march flag higher than typical baseline.
23 This is required for a number of static inline functions in the public headers.''',
24 subdirs: [get_option('include_subdir_arch'), '.'],
25 extra_cflags: pkg_extra_cflags