# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
error('unsupported system type "@0@"'.format(exec_env))
endif
+# define a handy variable for checking which OS we have.
+# gives us "is_windows", "is_freebsd" and "is_linux"
+foreach env:supported_exec_envs
+ set_variable('is_' + env, exec_env == env)
+endforeach
+
# set the major version, which might be used by drivers and libraries
# depending on the configuration options
pver = meson.project_version().split('.')
endif
# for linux link against dl, for bsd execinfo
-if host_machine.system() == 'linux'
+if is_linux
link_lib = 'dl'
-elif host_machine.system() == 'freebsd'
+elif is_freebsd
link_lib = 'execinfo'
else
link_lib = ''
endif
# check for strlcpy
-if host_machine.system() == 'linux'
+if is_linux
libbsd = dependency('libbsd', required: false)
if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
# enable VFIO only if it is linux OS
-dpdk_conf.set('RTE_EAL_VFIO', host_machine.system() == 'linux')
+dpdk_conf.set('RTE_EAL_VFIO', is_linux)
march_opt = ['-march=@0@'.format(machine)]
# get binutils version for the workaround of Bug 97
-if host_machine.system() != 'windows'
+if not is_windows
ldver = run_command('ld', '-v').stdout().strip()
if ldver.contains('2.30')
if cc.has_argument('-mno-avx512f')
.. code-block:: python
- if host_machine.system() != 'linux'
+ if not is_linux
build = false
endif
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('pci_common.c',
'pci_common_uio.c',
'pci_params.c')
-if host_machine.system() == 'linux'
+if is_linux
sources += files('linux/pci.c',
'linux/pci_uio.c',
'linux/pci_vfio.c')
'vmbus_bufring.c',
'vmbus_common_uio.c')
-if host_machine.system() == 'linux'
+if is_linux
sources += files('linux/vmbus_bus.c',
'linux/vmbus_uio.c')
includes += include_directories('linux')
allow_experimental_apis = true
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
dep = dependency('libcrypto', required: false)
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Cavium, Inc
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['pmd_dpaa']
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['bus_vdev', 'pmd_dpaa2', 'pmd_dpaa2_sec']
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2019 Intel Corporation
-if host_machine.system() == 'windows'
+if is_windows
subdir_done()
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('rte_eth_af_packet.c')
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('avp_ethdev.c')
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['mempool_dpaa']
version = 2
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 NXP
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
cflags += '-D_DEFAULT_SOURCE'
cflags += '-D_XOPEN_SOURCE=700'
cflags += '-pedantic'
-if host_machine.system() == 'linux'
+if is_linux
cflags += '-DLINUX'
else
cflags += '-DBSD'
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('nfpcore/nfp_cpp_pcie_ops.c',
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
allow_experimental_apis = true
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018 Luca Boccassi <bluca@debian.org>
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files(
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('vdev_netvsc.c')
sources += files('virtio_rxtx_simple_neon.c')
endif
-if host_machine.system() == 'linux'
+if is_linux
dpdk_conf.set('RTE_VIRTIO_USER', 1)
sources += files('virtio_user_ethdev.c',
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
allow_experimental_apis = true
ext_deps = [execinfo]
includes = [include_directories(example)]
deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
- if host_machine.system() == 'windows'
+ if is_windows
deps = ['eal'] # only supported lib on Windows currently
endif
subdir(example)
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += ['hash', 'vhost']
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += 'vhost'
allow_experimental_apis = true
sources = files(
'main.c'
-)
\ No newline at end of file
+)
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
deps += 'vhost'
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-subdir(host_machine.system())
+subdir(exec_env)
version = 6
allow_experimental_apis = true
-if host_machine.system() == 'linux'
+if is_linux
cflags += '-DLINUX'
else
cflags += '-DBSD'
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux' or not dpdk_conf.get('RTE_ARCH_64')
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
build = false
endif
version = 2
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
sources = files('rte_power.c', 'power_acpi_cpufreq.c',
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2018 Intel Corporation
-if host_machine.system() != 'linux'
+if not is_linux
build = false
endif
if has_libnuma == 1
# flow_classify lib depends on pkt framework table lib
'flow_classify', 'bpf', 'telemetry']
-if host_machine.system() == 'windows'
+if is_windows
libraries = ['kvargs','eal'] # only supported libraries for windows
endif
meson.current_source_dir(), dir_name, name)
exports = []
implib = dir_name + '.dll.a'
- if host_machine.system() == 'windows'
+ if is_windows
exports = '@0@/@1@/rte_@2@_exports.def'.format(
meson.current_source_dir(), dir_name, name)
lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib]