2017-12-18 15:56:25 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2019-04-02 03:54:51 +00:00
|
|
|
# Copyright(c) 2017-2019 Intel Corporation
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
|
|
|
|
project('DPDK', 'C',
|
2021-04-20 10:22:23 +00:00
|
|
|
# Get version number from file.
|
|
|
|
# Fallback to "more" for Windows compatibility.
|
|
|
|
version: run_command(find_program('cat', 'more'),
|
2022-01-20 18:06:39 +00:00
|
|
|
files('VERSION'), check: true).stdout().strip(),
|
2021-04-20 10:22:23 +00:00
|
|
|
license: 'BSD',
|
2022-01-21 16:12:30 +00:00
|
|
|
default_options: [
|
|
|
|
'buildtype=release',
|
|
|
|
'default_library=static',
|
|
|
|
'warning_level=2',
|
|
|
|
],
|
2022-10-07 16:24:04 +00:00
|
|
|
meson_version: '>= 0.53.2'
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
)
|
|
|
|
|
2021-02-25 15:29:01 +00:00
|
|
|
# check for developer mode
|
|
|
|
developer_mode = false
|
|
|
|
if get_option('developer_mode').auto()
|
2022-10-07 16:24:04 +00:00
|
|
|
fs = import('fs')
|
|
|
|
developer_mode = fs.exists('.git')
|
2021-02-25 15:29:01 +00:00
|
|
|
else
|
2021-04-20 10:22:23 +00:00
|
|
|
developer_mode = get_option('developer_mode').enabled()
|
2021-02-25 15:29:01 +00:00
|
|
|
endif
|
|
|
|
if developer_mode
|
2021-04-20 10:22:23 +00:00
|
|
|
message('## Building in Developer Mode ##')
|
2021-02-25 15:29:01 +00:00
|
|
|
endif
|
|
|
|
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
# set up some global vars for compiler, platform, configuration, etc.
|
|
|
|
cc = meson.get_compiler('c')
|
2022-01-24 17:49:59 +00:00
|
|
|
dpdk_source_root = meson.current_source_dir()
|
|
|
|
dpdk_build_root = meson.current_build_dir()
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
dpdk_conf = configuration_data()
|
2022-10-14 07:51:18 +00:00
|
|
|
dpdk_includes = []
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
dpdk_libraries = []
|
2018-10-27 09:17:50 +00:00
|
|
|
dpdk_static_libraries = []
|
2022-05-06 14:43:18 +00:00
|
|
|
dpdk_shared_lib_deps = []
|
|
|
|
dpdk_static_lib_deps = []
|
2021-01-29 16:48:21 +00:00
|
|
|
dpdk_chkinc_headers = []
|
2019-03-25 10:34:59 +00:00
|
|
|
dpdk_driver_classes = []
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
dpdk_drivers = []
|
|
|
|
dpdk_extra_ldflags = []
|
2022-10-10 10:44:46 +00:00
|
|
|
dpdk_libs_deprecated = []
|
2019-06-05 20:22:39 +00:00
|
|
|
dpdk_libs_disabled = []
|
|
|
|
dpdk_drvs_disabled = []
|
2022-05-24 20:06:42 +00:00
|
|
|
testpmd_drivers_sources = []
|
|
|
|
testpmd_drivers_deps = []
|
2019-11-23 02:59:59 +00:00
|
|
|
abi_version_file = files('ABI_VERSION')
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
|
2020-04-30 16:01:20 +00:00
|
|
|
if host_machine.cpu_family().startswith('x86')
|
2021-04-20 10:22:23 +00:00
|
|
|
arch_subdir = 'x86'
|
2020-04-30 16:01:20 +00:00
|
|
|
elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
|
2021-04-20 10:22:23 +00:00
|
|
|
arch_subdir = 'arm'
|
2022-10-04 15:40:42 +00:00
|
|
|
elif host_machine.cpu_family().startswith('loongarch')
|
|
|
|
arch_subdir = 'loongarch'
|
2020-04-30 16:01:20 +00:00
|
|
|
elif host_machine.cpu_family().startswith('ppc')
|
2021-04-20 10:22:23 +00:00
|
|
|
arch_subdir = 'ppc'
|
2022-06-07 10:46:10 +00:00
|
|
|
elif host_machine.cpu_family().startswith('riscv')
|
|
|
|
arch_subdir = 'riscv'
|
2020-04-30 16:01:20 +00:00
|
|
|
endif
|
|
|
|
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
# configure the build, and make sure configs here and in config folder are
|
|
|
|
# able to be included in any file. We also store a global array of include dirs
|
|
|
|
# for passing to pmdinfogen scripts
|
2019-04-02 03:54:51 +00:00
|
|
|
global_inc = include_directories('.', 'config',
|
2021-04-20 10:22:30 +00:00
|
|
|
'lib/eal/include',
|
|
|
|
'lib/eal/@0@/include'.format(host_machine.system()),
|
|
|
|
'lib/eal/@0@/include'.format(arch_subdir),
|
2019-04-02 03:54:51 +00:00
|
|
|
)
|
2020-07-04 11:48:01 +00:00
|
|
|
|
|
|
|
# do configuration and get tool paths
|
|
|
|
subdir('buildtools')
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
subdir('config')
|
|
|
|
|
2017-08-29 13:49:45 +00:00
|
|
|
# build libs and drivers
|
2019-04-12 08:29:00 +00:00
|
|
|
subdir('lib')
|
2017-08-29 13:49:45 +00:00
|
|
|
subdir('drivers')
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
|
2017-08-30 14:29:15 +00:00
|
|
|
# build binaries and installable tools
|
|
|
|
subdir('usertools')
|
2017-08-30 13:38:34 +00:00
|
|
|
subdir('app')
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
|
2018-09-11 20:42:36 +00:00
|
|
|
# build docs
|
|
|
|
subdir('doc')
|
|
|
|
|
2019-05-17 12:02:29 +00:00
|
|
|
# build any examples explicitly requested - useful for developers - and
|
|
|
|
# install any example code into the appropriate install path
|
|
|
|
subdir('examples')
|
2020-11-12 09:41:39 +00:00
|
|
|
install_subdir('examples',
|
2021-04-20 10:22:23 +00:00
|
|
|
install_dir: get_option('datadir') + '/dpdk',
|
|
|
|
exclude_files: ex_file_excludes)
|
examples: build some samples with meson
Add support for having selected example apps built as part of a meson,
ninja build. By default none are built, and those to be built should be
named directly in the -Dexamples='' meson configuration argument.
This is useful for developers working on a feature who want to use a
suitable example, or examples, to test that feature, as they can compile
everything up in one go, and run the example without having to do a ninja
install first.
This commit adds examples which don't consist of multiple apps in
subdirectories to the meson build, so they can be built by default by
passing -Dexamples parameter to meson.
Not included are the following examples:
* ethtool
* multi-process
* netmap_compat
* performance-thread
* quota_watermark
* server_node_efd
* vm_power_manager
To test the apps added here, use the following command, merged to one line,
to add them to your meson build (command to be run inside the build
directory):
meson configure -Dexamples=bbdev_app,bond,cmdline,distributor,\
eventdev_pipeline_sw_pmd, exception_path,helloworld,\
ip_fragmentation,ip_pipeline,ip_reassembly, ipsec-secgw,\
ipv4_multicast,kni,l2fwd-cat,l2fwd-crypto,l2fwd-jobstats,\
l2fwd-keepalive,l2fwd,l3fwd-acl,l3fwd-power,l3fwd-vf,l3fwd,\
link_status_interrupt,load_balancer,packet_ordering,ptpclient,\
qos_meter,qos_sched,rxtx_callbacks,skeleton,tep_termination,\
timer,vhost,vhost_scsi,vmdq,vmdq_dcb
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
2017-09-12 15:42:02 +00:00
|
|
|
|
2018-04-27 13:49:26 +00:00
|
|
|
# build kernel modules if enabled
|
|
|
|
if get_option('enable_kmods')
|
2021-04-20 10:22:23 +00:00
|
|
|
subdir('kernel')
|
2018-04-27 13:49:26 +00:00
|
|
|
endif
|
|
|
|
|
2021-01-29 16:48:21 +00:00
|
|
|
# check header includes if requested
|
|
|
|
if get_option('check_includes')
|
2021-04-20 10:22:23 +00:00
|
|
|
subdir('buildtools/chkincs')
|
2021-01-29 16:48:21 +00:00
|
|
|
endif
|
|
|
|
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
# write the build config
|
|
|
|
build_cfg = 'rte_build_config.h'
|
|
|
|
configure_file(output: build_cfg,
|
2021-04-20 10:22:23 +00:00
|
|
|
configuration: dpdk_conf,
|
|
|
|
install_dir: join_paths(get_option('includedir'),
|
|
|
|
get_option('include_subdir_arch')))
|
build: add infrastructure for meson and ninja builds
To build with meson and ninja, we need some initial infrastructure in
place. The build files for meson always need to be called "meson.build",
and options get placed in meson_options.txt
This commit adds a top-level meson.build file, which sets up the global
variables for tracking drivers, libraries, etc., and then includes other
build files, before finishing by writing the global build configuration
header file and a DPDK pkgconfig file at the end, using some of those same
globals.
From the top level build file, the only include file thus far is for the
config folder, which does some other setup of global configuration
parameters, including pulling in architecture specific parameters from an
architectural subdirectory. A number of configuration build options are
provided for the project to tune a number of global variables which will be
used later e.g. max numa nodes, max cores, etc. These settings all make
their way to the global build config header "rte_build_config.h". There is
also a file "rte_config.h", which includes "rte_build_config.h", and this
file is meant to hold other build-time values which are present in our
current static build configuration but are not normally meant for
user-configuration. Ideally, over time, the values placed here should be
moved to the individual libraries or drivers which want those values.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-08-28 10:57:12 +00:00
|
|
|
|
2020-06-30 14:14:30 +00:00
|
|
|
# build pkg-config files for dpdk
|
|
|
|
subdir('buildtools/pkg-config')
|
2018-08-29 16:19:20 +00:00
|
|
|
|
2022-05-06 14:43:18 +00:00
|
|
|
if meson.is_subproject()
|
|
|
|
subdir('buildtools/subproject')
|
|
|
|
endif
|
|
|
|
|
2018-08-29 16:19:20 +00:00
|
|
|
# final output, list all the libs and drivers to be built
|
|
|
|
# this does not affect any part of the build, for information only.
|
|
|
|
output_message = '\n=================\nLibraries Enabled\n=================\n'
|
|
|
|
output_message += '\nlibs:\n\t'
|
|
|
|
output_count = 0
|
|
|
|
foreach lib:enabled_libs
|
2021-04-20 10:22:23 +00:00
|
|
|
output_message += lib + ', '
|
|
|
|
output_count += 1
|
|
|
|
if output_count == 8
|
|
|
|
output_message += '\n\t'
|
|
|
|
output_count = 0
|
|
|
|
endif
|
2018-08-29 16:19:20 +00:00
|
|
|
endforeach
|
|
|
|
message(output_message + '\n')
|
|
|
|
|
2019-02-26 17:46:32 +00:00
|
|
|
output_message = '\n===============\nDrivers Enabled\n===============\n'
|
2019-03-25 10:34:59 +00:00
|
|
|
foreach class:dpdk_driver_classes
|
2021-04-20 10:22:23 +00:00
|
|
|
class_drivers = get_variable(class + '_drivers')
|
|
|
|
output_message += '\n' + class + ':\n\t'
|
|
|
|
output_count = 0
|
|
|
|
foreach drv:class_drivers
|
|
|
|
output_message += drv + ', '
|
|
|
|
output_count += 1
|
|
|
|
if output_count == 8
|
|
|
|
output_message += '\n\t'
|
|
|
|
output_count = 0
|
|
|
|
endif
|
|
|
|
endforeach
|
2019-02-26 17:46:32 +00:00
|
|
|
endforeach
|
|
|
|
message(output_message + '\n')
|
2019-06-05 20:22:39 +00:00
|
|
|
|
|
|
|
output_message = '\n=================\nContent Skipped\n=================\n'
|
|
|
|
output_message += '\nlibs:\n\t'
|
|
|
|
foreach lib:dpdk_libs_disabled
|
2021-04-20 10:22:23 +00:00
|
|
|
reason = get_variable(lib.underscorify() + '_disable_reason')
|
|
|
|
output_message += lib + ':\t' + reason + '\n\t'
|
2019-06-05 20:22:39 +00:00
|
|
|
endforeach
|
|
|
|
output_message += '\ndrivers:\n\t'
|
|
|
|
foreach drv:dpdk_drvs_disabled
|
2021-04-20 10:22:23 +00:00
|
|
|
reason = get_variable(drv.underscorify() + '_disable_reason')
|
|
|
|
output_message += drv + ':\t' + reason + '\n\t'
|
2019-06-05 20:22:39 +00:00
|
|
|
endforeach
|
|
|
|
message(output_message + '\n')
|