1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
4 # Custom EAL processing. EAL is complicated enough that it can't just
5 # have a straight list of headers and source files.
6 # Initially pull in common settings
8 subdir('common') # defines common_sources, common_objs, etc.
10 # Now do OS/exec-env specific settings, including building kernel modules
11 # The <exec-env>/eal/meson.build file should define env_sources, etc.
12 if host_machine.system() == 'linux'
13 dpdk_conf.set('RTE_EXEC_ENV_LINUXAPP', 1)
14 subdir('linuxapp/eal')
15 subdir('linuxapp/igb_uio')
17 elif host_machine.system() == 'freebsd'
18 dpdk_conf.set('RTE_EXEC_ENV_BSDAPP', 1)
20 kmods = ['contigmem', 'nic_uio']
22 # for building kernel modules, we use kernel build system using make, as
23 # with Linux. We have a skeleton BSDmakefile, which pulls many of its
24 # values from the environment. Each module only has a single source file
25 # right now, which allows us to simplify things. We pull in the sourcer
26 # files from the individual meson.build files, and then use a custom
27 # target to call make, passing in the values as env parameters.
28 kmod_cflags = ['-I' + meson.build_root(),
29 '-I' + join_paths(meson.source_root(), 'config'),
30 '-include rte_config.h']
32 subdir(join_paths('bsdapp', k))
34 input: [files('bsdapp/BSDmakefile.meson'), sources],
36 command: ['make', '-f', '@INPUT0@',
39 'VPATH=' + join_paths(meson.current_source_dir(), k),
40 'KMOD_CFLAGS=' + ' '.join(kmod_cflags)],
41 build_by_default: get_option('enable_kmods'))
44 error('unsupported system type @0@'.format(hostmachine.system()))
47 version = 6 # the version of the EAL API
48 allow_experimental_apis = true
50 cflags += '-D_GNU_SOURCE'
51 sources = common_sources + env_sources
52 objs = common_objs + env_objs
53 headers = common_headers + env_headers