ia64/xen-unstable

changeset 10782:d71e72d8532c

Add versioning info to xenstore library.
From: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jul 25 15:33:00 2006 +0100 (2006-07-25)
parents 7dfc65c38035
children f7b43e5c42b9 10fb002727ef
files tools/xenstore/Makefile
line diff
     1.1 --- a/tools/xenstore/Makefile	Tue Jul 25 15:21:59 2006 +0100
     1.2 +++ b/tools/xenstore/Makefile	Tue Jul 25 15:33:00 2006 +0100
     1.3 @@ -2,6 +2,9 @@ XEN_ROOT=../..
     1.4  include $(XEN_ROOT)/tools/Rules.mk
     1.5  XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     1.6  
     1.7 +MAJOR = 3.0
     1.8 +MINOR = 0
     1.9 +
    1.10  INSTALL         = install
    1.11  INSTALL_DATA	= $(INSTALL) -m0644
    1.12  INSTALL_PROG    = $(INSTALL) -m0755
    1.13 @@ -86,15 +89,20 @@ xs_test_lib.o: xs.c
    1.14  talloc_test.o: talloc.c
    1.15  	$(COMPILE.c) -o $@ $<
    1.16  
    1.17 -libxenstore.so: xs.opic xs_lib.opic
    1.18 -	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ -lpthread
    1.19 +libxenstore.so: libxenstore.so.$(MAJOR)
    1.20 +	ln -sf $< $@
    1.21 +libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR)
    1.22 +	ln -sf $< $@
    1.23  
    1.24 -libxenstore.a: libxenstore.so
    1.25 +libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
    1.26 +	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) -shared -o $@ $^ -lpthread
    1.27 +
    1.28 +libxenstore.a: xs.o xs_lib.o
    1.29  	ar rcs libxenstore.a $^
    1.30  
    1.31  .PHONY: clean
    1.32  clean: testsuite-clean
    1.33 -	rm -f *.o *.opic *.so
    1.34 +	rm -f *.o *.opic *.so*
    1.35  	rm -f xenstored xs_random xs_stress xs_crashme
    1.36  	rm -f xs_test xenstored_test xs_tdb_dump xenstore-control xenstore-ls
    1.37  	rm -f $(CLIENTS)
    1.38 @@ -174,7 +182,9 @@ install: all
    1.39  	$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
    1.40  	$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
    1.41  	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
    1.42 -	$(INSTALL_PROG) libxenstore.so* $(DESTDIR)/usr/$(LIBDIR)
    1.43 +	$(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
    1.44 +	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
    1.45 +	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so
    1.46  	$(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
    1.47  	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
    1.48  	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include