From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: yi.y.sun@linux.intel.com, Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
zhangchen.fnst@cn.fujitsu.com, haozhong.zhang@intel.com
Subject: [PATCH 1/2] tools: provide libxlutil compiling and linking options
Date: Tue, 21 Feb 2017 15:51:41 +0000 [thread overview]
Message-ID: <20170221155142.17288-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170221155142.17288-1-wei.liu2@citrix.com>
We are about to split out xl (which depends on libxlutil) to a different
directory. Provide the proper options for compiling and linking in
Rules.mk, and replace the hardcoded string in libxl/Makefile.
No functional change.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
tools/Rules.mk | 7 +++++++
tools/libxl/Makefile | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/Rules.mk b/tools/Rules.mk
index b35999b21b..8a16013335 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -17,6 +17,8 @@ XEN_LIBXENCALL = $(XEN_ROOT)/tools/libs/call
XEN_LIBXENFOREIGNMEMORY = $(XEN_ROOT)/tools/libs/foreignmemory
XEN_LIBXC = $(XEN_ROOT)/tools/libxc
XEN_XENLIGHT = $(XEN_ROOT)/tools/libxl
+# Currently libxlutil lives in the same directory as libxenlight
+XEN_XLUTIL = $(XEN_XENLIGHT)
XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore
XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src
XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2
@@ -172,6 +174,11 @@ SHDEPS_libxenlight = $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapc
LDLIBS_libxenlight = $(SHDEPS_libxenlight) $(XEN_XENLIGHT)/libxenlight$(libextension)
SHLIB_libxenlight = $(SHDEPS_libxenlight) -Wl,-rpath-link=$(XEN_XENLIGHT)
+CFLAGS_libxlutil = -I$(XEN_XLUTIL)
+SHDEPS_libxlutil = $(SHLIB_libxenlight)
+LDLIBS_libxlutil = $(SHDEPS_libxlutil) $(XEN_XENLIGHT)/libxlutil$(libextension)
+SHLIB_libxlutil = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_XLUTIL)
+
CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__
# Get gcc to generate the dependencies for us.
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 6cc7b4511b..0f642cc57a 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -289,7 +289,7 @@ libxlutil.a: $(LIBXLU_OBJS)
$(AR) rcs libxlutil.a $^
xl: $(XL_OBJS) libxlutil.so libxenlight.so
- $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
+ $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxlutil) $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
test_%: test_%.o test_common.o libxlutil.so libxenlight_test.so
$(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) -lyajl $(APPEND_LDFLAGS)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-21 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 15:51 [PATCH 0/2] tools: split xl into a separate directory Wei Liu
2017-02-21 15:51 ` Wei Liu [this message]
2017-02-21 15:51 ` [PATCH 2/2] tools: move xl to a dedicated directory Wei Liu
2017-02-23 12:17 ` [PATCH 0/2] tools: split xl into a separate directory Ian Jackson
2017-02-23 13:20 ` Wei Liu
2017-02-23 14:55 ` Wei Liu
2017-02-23 15:54 ` Ian Jackson
2017-02-23 15:57 ` Wei Liu
2017-02-23 16:29 ` Ian Jackson
2017-02-23 16:59 ` Wei Liu
2017-02-23 17:01 ` Wei Liu
2017-02-23 17:25 ` Ian Jackson
2017-02-23 17:27 ` Wei Liu
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=20170221155142.17288-2-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=haozhong.zhang@intel.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yi.y.sun@linux.intel.com \
--cc=zhangchen.fnst@cn.fujitsu.com \
/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).