From: Ruslan Babayev <ruslan@babayev.com>
To: dev@dpdk.org
Cc: Ruslan Babayev <ruslan@babayev.com>
Subject: [dpdk-dev] [PATCH] build: add combined libs
Date: Wed, 19 Feb 2020 11:13:26 -0800 [thread overview]
Message-ID: <20200219191326.35842-1-ruslan@babayev.com> (raw)
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
next reply other threads:[~2020-02-19 19:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 19:13 Ruslan Babayev [this message]
2020-02-20 10:13 ` Luca Boccassi
2020-02-20 21:35 ` Ruslan Babayev
2020-02-20 22:00 ` Luca Boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200219191326.35842-1-ruslan@babayev.com \
--to=ruslan@babayev.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).