eal/memory: fix unused SIGBUS handler
[dpdk.git] / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2019 Intel Corporation
3
4 project('DPDK', 'C',
5         # Get version number from file.
6         # Fallback to "more" for Windows compatibility.
7         version: run_command(find_program('cat', 'more'),
8             files('VERSION')).stdout().strip(),
9         license: 'BSD',
10         default_options: ['buildtype=release', 'default_library=static'],
11         meson_version: '>= 0.49.2'
12 )
13
14 # check for developer mode
15 developer_mode = false
16 if get_option('developer_mode').auto()
17     if meson.version().version_compare('>=0.53') # fs module available
18         fs = import('fs')
19         developer_mode = fs.is_dir('.git')
20     endif
21 else
22     developer_mode = get_option('developer_mode').enabled()
23 endif
24 if developer_mode
25     message('## Building in Developer Mode ##')
26 endif
27
28 # set up some global vars for compiler, platform, configuration, etc.
29 cc = meson.get_compiler('c')
30 dpdk_conf = configuration_data()
31 dpdk_libraries = []
32 dpdk_static_libraries = []
33 dpdk_chkinc_headers = []
34 dpdk_driver_classes = []
35 dpdk_drivers = []
36 dpdk_extra_ldflags = []
37 dpdk_libs_disabled = []
38 dpdk_drvs_disabled = []
39 abi_version_file = files('ABI_VERSION')
40
41 if host_machine.cpu_family().startswith('x86')
42     arch_subdir = 'x86'
43 elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
44     arch_subdir = 'arm'
45 elif host_machine.cpu_family().startswith('ppc')
46     arch_subdir = 'ppc'
47 endif
48
49 # configure the build, and make sure configs here and in config folder are
50 # able to be included in any file. We also store a global array of include dirs
51 # for passing to pmdinfogen scripts
52 global_inc = include_directories('.', 'config',
53     'lib/eal/include',
54     'lib/eal/@0@/include'.format(host_machine.system()),
55     'lib/eal/@0@/include'.format(arch_subdir),
56 )
57
58 # do configuration and get tool paths
59 subdir('buildtools')
60 subdir('config')
61
62 # build libs and drivers
63 subdir('lib')
64 subdir('drivers')
65
66 # build binaries and installable tools
67 subdir('usertools')
68 subdir('app')
69
70 # build docs
71 subdir('doc')
72
73 # build any examples explicitly requested - useful for developers - and
74 # install any example code into the appropriate install path
75 subdir('examples')
76 install_subdir('examples',
77         install_dir: get_option('datadir') + '/dpdk',
78         exclude_files: ex_file_excludes)
79
80 # build kernel modules if enabled
81 if get_option('enable_kmods')
82     subdir('kernel')
83 endif
84
85 # check header includes if requested
86 if get_option('check_includes')
87     subdir('buildtools/chkincs')
88 endif
89
90 # write the build config
91 build_cfg = 'rte_build_config.h'
92 configure_file(output: build_cfg,
93         configuration: dpdk_conf,
94         install_dir: join_paths(get_option('includedir'),
95             get_option('include_subdir_arch')))
96
97 # build pkg-config files for dpdk
98 subdir('buildtools/pkg-config')
99
100 # final output, list all the libs and drivers to be built
101 # this does not affect any part of the build, for information only.
102 output_message = '\n=================\nLibraries Enabled\n=================\n'
103 output_message += '\nlibs:\n\t'
104 output_count = 0
105 foreach lib:enabled_libs
106     output_message += lib + ', '
107     output_count += 1
108     if output_count == 8
109         output_message += '\n\t'
110         output_count = 0
111     endif
112 endforeach
113 message(output_message + '\n')
114
115 output_message = '\n===============\nDrivers Enabled\n===============\n'
116 foreach class:dpdk_driver_classes
117     class_drivers = get_variable(class + '_drivers')
118     output_message += '\n' + class + ':\n\t'
119     output_count = 0
120     foreach drv:class_drivers
121         output_message += drv + ', '
122         output_count += 1
123         if output_count == 8
124             output_message += '\n\t'
125             output_count = 0
126         endif
127     endforeach
128 endforeach
129 message(output_message + '\n')
130
131 output_message = '\n=================\nContent Skipped\n=================\n'
132 output_message += '\nlibs:\n\t'
133 foreach lib:dpdk_libs_disabled
134     reason = get_variable(lib.underscorify() + '_disable_reason')
135     output_message += lib + ':\t' + reason + '\n\t'
136 endforeach
137 output_message += '\ndrivers:\n\t'
138 foreach drv:dpdk_drvs_disabled
139     reason = get_variable(drv.underscorify() + '_disable_reason')
140     output_message += drv + ':\t' + reason + '\n\t'
141 endforeach
142 message(output_message + '\n')