From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xensource.com, xen-arm@lists.xensource.com
Cc: stefano.stabellini@citrix.com, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 4/5] blktap2/libvhd: Build shared objects using -fPIC.
Date: Mon, 16 Jan 2012 12:16:09 +0000 [thread overview]
Message-ID: <1326716171-4298-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1326716171-4298-1-git-send-email-ian.campbell@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
tools/blktap2/vhd/lib/Makefile | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile
index 97379c1..8ee169e 100644
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -45,27 +45,32 @@ LIB-SRCS += atomicio.c
LIB-OBJS = $(patsubst %.c,%.o,$(LIB-SRCS))
LIB-OBJS += $(LVM-UTIL-OBJ)
+LIB-PICOBJS = $(patsubst %.o,%.opic,$(LIB-OBJS))
+
LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)
all: build
-build: $(LIBVHD-BUILD)
+build: libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)
libvhd.a: $(LIB-OBJS)
+ $(AR) rc $@ $^
+
+libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR): $(LIB-PICOBJS)
$(CC) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \
$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
- $(AR) rc $@ $^
install: all
$(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR)
- $(INSTALL_PROG) $(LIBVHD) $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.a $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so
clean:
- rm -rf *.a *.so* *.o *~ $(DEPS) $(LIBVHD)
+ rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD)
.PHONY: all build clean install libvhd
--
1.7.8.3
next prev parent reply other threads:[~2012-01-16 12:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 12:02 [PATCH 0/5] ARM: Start working on tools Ian Campbell
2012-01-16 12:15 ` [XenARM] " Ian Campbell
2012-01-16 12:16 ` [PATCH 1/5] arm: add stub hvm/save.h Ian Campbell
2012-01-16 12:16 ` [PATCH 2/5] arm: allow libxc to build (untested) Ian Campbell
2012-01-16 18:01 ` Stefano Stabellini
2012-01-16 12:16 ` [PATCH 3/5] libxl: do not allocate e820 for non x86 guests Ian Campbell
2012-01-16 12:16 ` Ian Campbell [this message]
2012-01-16 12:16 ` [PATCH 5/5] DO-NOT-APPLY: Hackily remove bits which don't (yet) build on ARM Ian Campbell
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=1326716171-4298-4-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-arm@lists.xensource.com \
--cc=xen-devel@lists.xensource.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).