summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/meson.build13
-rw-r--r--lib/librte_eal/bsdapp/eal/meson.build12
-rw-r--r--lib/librte_eal/linuxapp/eal/meson.build12
-rw-r--r--lib/meson.build12
-rw-r--r--meson_options.txt1
5 files changed, 46 insertions, 4 deletions
diff --git a/drivers/meson.build b/drivers/meson.build
index b4abc32..ee3bb47 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -97,6 +97,16 @@ foreach class:driver_classes
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(
@@ -110,7 +120,8 @@ foreach class:driver_classes
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)
diff --git a/lib/librte_eal/bsdapp/eal/meson.build b/lib/librte_eal/bsdapp/eal/meson.build
index 2bd62dd..28ea4f3 100644
--- a/lib/librte_eal/bsdapp/eal/meson.build
+++ b/lib/librte_eal/bsdapp/eal/meson.build
@@ -43,10 +43,20 @@ sources = ['eal_alarm.c',
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,
diff --git a/lib/librte_eal/linuxapp/eal/meson.build b/lib/librte_eal/linuxapp/eal/meson.build
index cb1b8fe..d4cdf3f 100644
--- a/lib/librte_eal/linuxapp/eal/meson.build
+++ b/lib/librte_eal/linuxapp/eal/meson.build
@@ -48,10 +48,20 @@ sources = ['eal_alarm.c',
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,
diff --git a/lib/meson.build b/lib/meson.build
index a4f5f28..0d4ec0d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -86,6 +86,15 @@ foreach l:libraries
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
@@ -97,7 +106,8 @@ foreach l:libraries
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),
diff --git a/meson_options.txt b/meson_options.txt
index 9c45b81..636226c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false,
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')