X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fmeson.build;h=1d8123b00ca069a7dc9d1dedec2d5b85fbd24784;hb=b4409f2b3f3efaacc58c71ea0ddcb798731460a3;hp=b78cac389789992c527fa28b8fe51cbc9a58536d;hpb=cf995efc5395069633069f6c7ce24f878805ff66;p=dpdk.git diff --git a/drivers/meson.build b/drivers/meson.build index b78cac3897..1d8123b00c 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -10,14 +10,16 @@ subdirs = [ 'common/qat', # depends on bus. 'common/sfc_efx', # depends on bus. 'mempool', # depends on common and bus. + 'dma', # depends on common and bus. 'net', # depends on common, bus, mempool - 'raw', # depends on common, bus and net. + 'raw', # depends on common, bus, dma and net. 'crypto', # depends on common, bus and mempool (net in future). 'compress', # depends on common, bus, mempool. 'regex', # depends on common, bus, regexdev. 'vdpa', # depends on common, bus and mempool. 'event', # depends on common, bus, mempool and net. 'baseband', # depends on common and bus. + 'gpu', # depends on common and bus. ] if meson.is_cross_build() @@ -27,17 +29,19 @@ endif # add cmdline disabled drivers and meson disabled drivers together disable_drivers += ',' + get_option('disable_drivers') -disable_drivers = run_command(list_dir_globs, disable_drivers).stdout().split() +disable_drivers = run_command(list_dir_globs, disable_drivers, check: true).stdout().split() # add cmdline enabled drivers and meson enabled drivers together enable_drivers = ',' + get_option('enable_drivers') -enable_drivers = run_command(list_dir_globs, enable_drivers).stdout().split() +enable_drivers = run_command(list_dir_globs, enable_drivers, check: true).stdout().split() if enable_drivers.length() == 0 - enable_drivers = run_command(list_dir_globs, '*/*').stdout().split() + enable_drivers = run_command(list_dir_globs, '*/*', check: true).stdout().split() endif # these drivers must always be enabled, otherwise the build breaks always_enable = ['bus/pci', 'bus/vdev'] +# we always need a mempool driver, and ring is default, so make it mandatory +always_enable += ['mempool/ring'] enable_drivers += always_enable default_cflags = machine_args @@ -51,6 +55,7 @@ endif foreach subpath:subdirs drivers = [] std_deps = [] + log_prefix = '' # subpath can be either "class" or "class/driver" if subpath.contains('/') @@ -69,6 +74,12 @@ foreach subpath:subdirs # get already enabled drivers of the same class enabled_drivers = get_variable(class + '_drivers', []) + # default log prefix can be defined per class + if log_prefix == '' + # default log name is pmd.class.driver + log_prefix = 'pmd.' + class + endif + foreach drv:drivers drv_path = join_paths(class, drv) @@ -102,16 +113,19 @@ foreach subpath:subdirs build = false reason = 'explicitly disabled via build config' endif - else - # pull in driver directory which should update all the local variables - subdir(drv_path) endif if build + # pull in driver directory which should update all the local variables + subdir(drv_path) + # get dependency objs from strings shared_deps = ext_deps static_deps = ext_deps foreach d:deps + if not build + break + endif if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) @@ -137,6 +151,7 @@ foreach subpath:subdirs enabled_drivers += name lib_name = '_'.join(['rte', class, name]) + cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=' + '.'.join([log_prefix, name]) dpdk_conf.set(lib_name.to_upper(), 1) dpdk_extra_ldflags += pkgconfig_extra_libs @@ -152,7 +167,7 @@ foreach subpath:subdirs include_directories: includes, dependencies: static_deps, c_args: cflags) - objs += tmp_lib.extract_all_objects() + objs += tmp_lib.extract_all_objects(recursive: true) sources = custom_target(out_filename, command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], output: out_filename,