Normally, each library has it's own version number based on the ABI.
Add an option to have all libs just use the DPDK version number as the
.so version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
depends: [pmdinfogen, tmp_lib])
endforeach
+ if get_option('per_library_versions')
+ lib_version = '@0@.1'.format(version)
+ so_version = '@0@'.format(version)
+ else
+ pver = meson.project_version().split('.')
+ lib_version = '@0@.@1@'.format(pver.get(0),
+ pver.get(1))
+ so_version = lib_version
+ endif
+
# now build the driver itself, and add to the drivers list
lib_name = driver_name_fmt.format(name)
version_map = '@0@/@1@/@2@_version.map'.format(
c_args: cflags,
link_args: '-Wl,--version-script=' + version_map,
link_depends: version_map,
- version: '@0@.1'.format(version),
+ version: lib_version,
+ soversion: so_version,
install: true,
install_dir: driver_install_path)
eal_extra_link_arg = '-lexecinfo'
eal_inc += include_directories('../../../librte_compat')
+if get_option('per_library_versions')
+ lib_version = '@0@.1'.format(version)
+ so_version = '@0@'.format(version)
+else
+ pver = meson.project_version().split('.')
+ lib_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
+ so_version = lib_version
+endif
+
eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources,
dependencies: dependency('threads'),
include_directories : eal_inc,
- version: '@0@.1'.format(version),
+ version: lib_version,
+ soversion: so_version,
c_args: ['-D_GNU_SOURCE', '-DALLOW_EXPERIMENTAL_API'],
link_depends: version_map,
link_args: [eal_extra_link_arg,
eal_extra_link_arg = '-ldl'
+if get_option('per_library_versions')
+ lib_version = '@0@.1'.format(version)
+ so_version = '@0@'.format(version)
+else
+ pver = meson.project_version().split('.')
+ lib_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
+ so_version = lib_version
+endif
+
eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources,
dependencies: dependency('threads'),
include_directories : eal_inc,
- version: '@0@.1'.format(version),
+ version: lib_version,
+ soversion: so_version,
c_args: ['-D_GNU_SOURCE', '-DALLOW_EXPERIMENTAL_API'],
link_depends: version_map,
link_args: [eal_extra_link_arg,
cflags += '-DALLOW_EXPERIMENTAL_API'
endif
+ if get_option('per_library_versions')
+ lib_version = '@0@.1'.format(version)
+ so_version = '@0@'.format(version)
+ else
+ pver = meson.project_version().split('.')
+ lib_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
+ so_version = lib_version
+ endif
+
version_map = '@0@/@1@/rte_@2@_version.map'.format(
meson.current_source_dir(), dir_name, name)
libname = 'rte_' + name
include_directories: include_directories(dir_name),
link_args: '-Wl,--version-script=' + version_map,
link_depends: version_map,
- version: '@0@.1'.format(version),
+ version: lib_version,
+ soversion: so_version,
install: true)
dep = declare_dependency(link_with: lib,
include_directories: include_directories(dir_name),
description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly')
option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules')
option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules')
+option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib')