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