X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmeson.build;h=d7602b748e130519834dd55f070d559549495dd9;hb=ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a;hp=290bd1e2680df23f5a7009a63834f4a7f6001c53;hpb=af331158f228aac12513abba13927a3745a41c14;p=dpdk.git diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index 290bd1e268..d7602b748e 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -9,11 +9,11 @@ if not is_linux endif static_ibverbs = (get_option('ibverbs_link') == 'static') -pmd_dlopen = (get_option('ibverbs_link') == 'dlopen') -LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so' -LIB_GLUE_VERSION = '18.02.0' +dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen') +LIB_GLUE_BASE = 'librte_net_mlx4_glue.so' +LIB_GLUE_VERSION = abi_version LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION -if pmd_dlopen +if dlopen_ibverbs dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1) cflags += [ '-DMLX4_GLUE="@0@"'.format(LIB_GLUE), @@ -24,13 +24,14 @@ endif libnames = [ 'mlx4', 'ibverbs' ] libs = [] foreach libname:libnames - lib = dependency('lib' + libname, static:static_ibverbs, required:false) + lib = dependency('lib' + libname, static:static_ibverbs, + required:false, method: 'pkg-config') if not lib.found() and not static_ibverbs lib = cc.find_library(libname, required:false) endif if lib.found() libs += lib - if not static_ibverbs + if not static_ibverbs and not dlopen_ibverbs ext_deps += lib endif else @@ -39,16 +40,17 @@ foreach libname:libnames subdir_done() endif endforeach -if static_ibverbs +if static_ibverbs or dlopen_ibverbs # Build without adding shared libs to Requires.private ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() ext_deps += declare_dependency(compile_args: ibv_cflags.split()) +endif +if static_ibverbs # Add static deps ldflags to internal apps and Libs.private ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout() ext_deps += declare_dependency(link_args:ibv_ldflags.split()) endif -allow_experimental_apis = true sources = files( 'mlx4.c', 'mlx4_ethdev.c', @@ -61,7 +63,7 @@ sources = files( 'mlx4_txq.c', 'mlx4_utils.c', ) -if not pmd_dlopen +if not dlopen_ibverbs sources += files('mlx4_glue.c') endif cflags_options = [ @@ -113,9 +115,9 @@ endforeach configure_file(output : 'mlx4_autoconf.h', configuration : config) # Build Glue Library -if pmd_dlopen +if dlopen_ibverbs dlopen_name = 'mlx4_glue' - dlopen_lib_name = driver_name_fmt.format(dlopen_name) + dlopen_lib_name = 'rte_net_' + dlopen_name dlopen_so_version = LIB_GLUE_VERSION dlopen_sources = files('mlx4_glue.c') dlopen_install_dir = [ eal_pmd_path + '-glue' ]