DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: add combined libs
@ 2020-02-19 19:13 Ruslan Babayev
  2020-02-20 10:13 ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: Ruslan Babayev @ 2020-02-19 19:13 UTC (permalink / raw)
  To: dev; +Cc: Ruslan Babayev

Add combined libdpdk.a and libdpdk.so libs for Meson similar to how
it's done for Make builds

Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
---
 buildtools/group-libs.sh |  2 ++
 buildtools/meson.build   |  1 +
 meson.build              | 17 +++++++++++++++++
 3 files changed, 20 insertions(+)
 create mode 100755 buildtools/group-libs.sh

diff --git a/buildtools/group-libs.sh b/buildtools/group-libs.sh
new file mode 100755
index 000000000..b6e4c1c35
--- /dev/null
+++ b/buildtools/group-libs.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo 'GROUP (' $(echo $* | xargs -n1 basename | sort | xargs) ')'
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 9812917e5..eac8bc4ff 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -6,6 +6,7 @@ subdir('pmdinfogen')
 pkgconf = find_program('pkg-config', 'pkgconf', required: false)
 pmdinfo = find_program('gen-pmdinfo-cfile.sh')
 list_dir_globs = find_program('list-dir-globs.py')
+group_libs = find_program('group-libs.sh')
 check_experimental_syms = find_program('check-experimental-syms.sh')
 ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
 
diff --git a/meson.build b/meson.build
index b7ae9c8d9..eb6974d35 100644
--- a/meson.build
+++ b/meson.build
@@ -61,6 +61,23 @@ configure_file(output: build_cfg,
 		install_dir: join_paths(get_option('includedir'),
 				get_option('include_subdir_arch')))
 
+
+custom_target('group_shared_libs',
+		input: dpdk_libraries,
+		output: 'libdpdk.so',
+		capture: true,
+		install: true,
+		install_dir: get_option('libdir'),
+		command: [group_libs, '@INPUT@'])
+
+custom_target('group_static_libs',
+		input: dpdk_static_libraries + dpdk_drivers,
+		output: 'libdpdk.a',
+		capture: true,
+		install: true,
+		install_dir: get_option('libdir'),
+		command: [group_libs, '@INPUT@'])
+
 # for static builds, include the drivers as libs and we need to "whole-archive"
 # them.
 dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-20 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 19:13 [dpdk-dev] [PATCH] build: add combined libs Ruslan Babayev
2020-02-20 10:13 ` Luca Boccassi
2020-02-20 21:35   ` Ruslan Babayev
2020-02-20 22:00     ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).