build: remove special handling for node library
[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.47.1'
12 )
13
14 # set up some global vars for compiler, platform, configuration, etc.
15 cc = meson.get_compiler('c')
16 dpdk_conf = configuration_data()
17 dpdk_libraries = []
18 dpdk_static_libraries = []
19 dpdk_driver_classes = []
20 dpdk_drivers = []
21 dpdk_extra_ldflags = []
22 dpdk_libs_disabled = []
23 dpdk_drvs_disabled = []
24 abi_version_file = files('ABI_VERSION')
25
26 if host_machine.cpu_family().startswith('x86')
27         arch_subdir = 'x86'
28 elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
29         arch_subdir = 'arm'
30 elif host_machine.cpu_family().startswith('ppc')
31         arch_subdir = 'ppc'
32 endif
33
34 # configure the build, and make sure configs here and in config folder are
35 # able to be included in any file. We also store a global array of include dirs
36 # for passing to pmdinfogen scripts
37 global_inc = include_directories('.', 'config',
38         'lib/librte_eal/include',
39         'lib/librte_eal/@0@/include'.format(host_machine.system()),
40         'lib/librte_eal/@0@/include'.format(arch_subdir),
41 )
42 subdir('config')
43
44 # build libs and drivers
45 subdir('buildtools')
46 subdir('lib')
47 subdir('drivers')
48
49 # build binaries and installable tools
50 subdir('usertools')
51 subdir('app')
52
53 # build docs
54 subdir('doc')
55
56 # build any examples explicitly requested - useful for developers - and
57 # install any example code into the appropriate install path
58 subdir('examples')
59
60 # build kernel modules if enabled
61 if get_option('enable_kmods')
62         subdir('kernel')
63 endif
64
65 # write the build config
66 build_cfg = 'rte_build_config.h'
67 configure_file(output: build_cfg,
68                 configuration: dpdk_conf,
69                 install_dir: join_paths(get_option('includedir'),
70                                 get_option('include_subdir_arch')))
71
72 # build pkg-config files for dpdk
73 subdir('buildtools/pkg-config')
74
75 # final output, list all the libs and drivers to be built
76 # this does not affect any part of the build, for information only.
77 output_message = '\n=================\nLibraries Enabled\n=================\n'
78 output_message += '\nlibs:\n\t'
79 output_count = 0
80 foreach lib:enabled_libs
81         output_message += lib + ', '
82         output_count += 1
83         if output_count == 8
84                 output_message += '\n\t'
85                 output_count = 0
86         endif
87 endforeach
88 message(output_message + '\n')
89
90 output_message = '\n===============\nDrivers Enabled\n===============\n'
91 foreach class:dpdk_driver_classes
92         class_drivers = get_variable(class + '_drivers')
93         output_message += '\n' + class + ':\n\t'
94         output_count = 0
95         foreach drv:class_drivers
96                 output_message += drv + ', '
97                 output_count += 1
98                 if output_count == 8
99                         output_message += '\n\t'
100                         output_count = 0
101                 endif
102         endforeach
103 endforeach
104 message(output_message + '\n')
105
106 output_message = '\n=================\nContent Skipped\n=================\n'
107 output_message += '\nlibs:\n\t'
108 foreach lib:dpdk_libs_disabled
109         reason = get_variable(lib.underscorify() + '_disable_reason')
110         output_message += lib + ':\t' + reason + '\n\t'
111 endforeach
112 output_message += '\ndrivers:\n\t'
113 foreach drv:dpdk_drvs_disabled
114         reason = get_variable(drv.underscorify() + '_disable_reason')
115         output_message += drv + ':\t' + reason + '\n\t'
116 endforeach
117 message(output_message + '\n')