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] Merge

# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1281624791 -3600
# Node ID c50a7139dc0d763e5147837c046e9c8faab06cf3
# Parent  8bb9cfaca402d19ba5d990a72fcb34560b2fcb71
# Parent  fbe6ef286e3f964c32cb2c4d7be326852d0726c8
Merge
---
 tools/blktap2/control/Makefile |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 deletions(-)

diff -r 8bb9cfaca402 -r c50a7139dc0d tools/blktap2/control/Makefile
--- a/tools/blktap2/control/Makefile    Wed Aug 11 18:26:47 2010 +0100
+++ b/tools/blktap2/control/Makefile    Thu Aug 12 15:53:11 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>