WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] add SONAME to libblktapctl.so

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] add SONAME to libblktapctl.so
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 02:15:49 -0700
Delivery-date: Fri, 13 Aug 2010 02:21:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1281622433 -3600
# Node ID fbe6ef286e3f964c32cb2c4d7be326852d0726c8
# Parent  d3de6f484610f6e9e6f9e613d3e8ea1e9bc63e5e
add SONAME to libblktapctl.so

Add an SONAME to libblktapctl.so.
Install static library as data to avoid executable permissions in the .a file.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---

 tools/blktap2/control/Makefile |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 deletions(-)

diff -r d3de6f484610 -r fbe6ef286e3f tools/blktap2/control/Makefile
--- a/tools/blktap2/control/Makefile    Wed Aug 11 18:02:32 2010 +0100
+++ b/tools/blktap2/control/Makefile    Thu Aug 12 15:13:53 2010 +0100
@@ -1,5 +1,10 @@ XEN_ROOT := ../../../
 XEN_ROOT := ../../../
 include $(XEN_ROOT)/tools/Rules.mk
+
+MAJOR              = 1.0
+MINOR              = 0
+LIBNAME            = libblktapctl
+LIBSONAME          = $(LIBNAME).so.$(MAJOR)
 
 IBIN               = tap-ctl
 
@@ -35,29 +40,39 @@ OBJS = $(CTL_OBJS) tap-ctl.o
 OBJS = $(CTL_OBJS) tap-ctl.o
 PICS = $(CTL_PICS)
 
-LIBS = libblktapctl.a libblktapctl.so
+LIB_STATIC = $(LIBNAME).a
+LIB_SHARED = $(LIBSONAME).$(MINOR)
 IBIN = tap-ctl
 
 all: build
 
-build: $(IBIN) $(LIBS)
+build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
 
-tap-ctl: tap-ctl.o libblktapctl.so
-       $(CC) $(CFLAGS) -o $@ $^
+$(LIBNAME).so: $(LIBSONAME)
+       ln -sf $< $@
 
-libblktapctl.a: $(CTL_OBJS)
+$(LIBSONAME): $(LIB_SHARED)
+       ln -sf $< $@
+
+tap-ctl: tap-ctl.o $(LIBNAME).so
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+$(LIB_STATIC): $(CTL_OBJS)
        $(AR) r $@ $^
 
-libblktapctl.so: $(CTL_PICS)
-       $(CC) $(CFLAGS) -fPIC -shared -rdynamic $^ -o $@
+$(LIB_SHARED): $(CTL_PICS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -fPIC  -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) 
$(SHLIB_LDFLAGS) -rdynamic $^ -o $@
 
-install: $(IBIN) $(LIBS)
+install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
        $(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
        $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
-       $(INSTALL_PROG) $(LIBS) $(DESTDIR)$(LIBDIR)
+       $(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
+       $(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
+       ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
+       ln -sf $(LIB_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBSONAME)
 
 clean:
-       rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIBS)
+       rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
        rm -f *~
 
 .PHONY: all build clean install

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] add SONAME to libblktapctl.so, Xen patchbot-unstable <=