X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fmeson.build;h=3b8b0998208a187dffffd41308baba59c6f67356;hb=cf8f6aa12a339c3140f71acde18b3dbe91cdb1b3;hp=9b99aa0be000a641caedb647fe171df1a6e86488;hpb=9cc02b1794a0e5576e9f0f0e1b9508d0632d5d6b;p=dpdk.git diff --git a/lib/meson.build b/lib/meson.build index 9b99aa0be0..3b8b099820 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -45,6 +45,7 @@ libraries = [ 'pdump', 'rawdev', 'regexdev', + 'dmadev', 'rib', 'reorder', 'sched', @@ -76,11 +77,39 @@ if is_windows 'ethdev', 'pci', 'cmdline', + 'metrics', 'hash', + 'timer', + 'bitratestats', + 'cryptodev', 'cfgfile', + 'gro', + 'gso', + 'latencystats', + 'pdump', + 'stack', + 'security', ] # only supported libraries for windows endif +optional_libs = [ + 'kni', + 'power', + 'vhost', +] + +disabled_libs = [] +opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), + check: true).stdout().split() +foreach l:opt_disabled_libs + if not optional_libs.contains(l) + warning('Cannot disable mandatory library "@0@"'.format(l)) + continue + endif + disabled_libs += l +endforeach + + default_cflags = machine_args default_cflags += ['-DALLOW_EXPERIMENTAL_API'] default_cflags += ['-DALLOW_INTERNAL_API'] @@ -114,8 +143,15 @@ foreach l:libraries deps += ['eal'] endif - dir_name = 'librte_' + l - subdir(dir_name) + if disabled_libs.contains(l) + build = false + reason = 'explicitly disabled via build config' + else + subdir(l) + endif + if name != l + warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l)) + endif if not build dpdk_libs_disabled += name @@ -128,7 +164,7 @@ foreach l:libraries foreach d:deps if not is_variable('shared_rte_' + d) error('Missing internal dependency "@0@" for @1@ [@2@]' - .format(d, name, 'lib/' + dir_name)) + .format(d, name, 'lib/' + l)) endif shared_deps += [get_variable('shared_rte_' + d)] static_deps += [get_variable('static_rte_' + d)] @@ -144,15 +180,16 @@ foreach l:libraries dpdk_chkinc_headers += headers libname = 'rte_' + name - includes += include_directories(dir_name) + includes += include_directories(l) - if is_windows and use_function_versioning + if developer_mode and is_windows and use_function_versioning message('@0@: Function versioning is not supported by Windows.'.format(name)) endif if use_function_versioning cflags += '-DRTE_USE_FUNCTION_VERSIONING' endif + cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l # first build static lib static_lib = static_library(libname, @@ -176,8 +213,8 @@ foreach l:libraries cflags += '-DRTE_BUILD_SHARED_LIB' endif version_map = '@0@/@1@/version.map'.format( - meson.current_source_dir(), dir_name) - implib = dir_name + '.dll.a' + meson.current_source_dir(), l) + implib = 'librte_' + l + '.dll.a' def_file = custom_target(libname + '_def', command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'], @@ -203,7 +240,7 @@ foreach l:libraries endif lk_deps = [version_map, def_file, mingw_map] - if not is_windows + if developer_mode and not is_windows # on unix systems check the output of the # check-symbols.sh script, using it as a # dependency of the .so build @@ -236,6 +273,6 @@ foreach l:libraries set_variable('shared_rte_' + name, shared_dep) set_variable('static_rte_' + name, static_dep) if developer_mode - message('lib/@0@: Defining dependency "@1@"'.format(dir_name, name)) + message('lib/@0@: Defining dependency "@1@"'.format(l, name)) endif endforeach