aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/Makefile
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-07-25 15:33:00 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-07-25 15:33:00 +0100
commitce6dad00689db3c5f009d2b536ec359e9cbfa105 (patch)
tree96eaef091ce9b89755a1cb9379352e1859c41410 /tools/xenstore/Makefile
parentd2945ac88d5480267ea22186d98299683acf9c68 (diff)
downloadxen-ce6dad00689db3c5f009d2b536ec359e9cbfa105.tar.gz
xen-ce6dad00689db3c5f009d2b536ec359e9cbfa105.tar.bz2
xen-ce6dad00689db3c5f009d2b536ec359e9cbfa105.zip
Add versioning info to xenstore library.
From: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstore/Makefile')
-rw-r--r--tools/xenstore/Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 11e6b93196..a504ac2645 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -2,6 +2,9 @@ XEN_ROOT=../..
include $(XEN_ROOT)/tools/Rules.mk
XEN_LIBXC = $(XEN_ROOT)/tools/libxc
+MAJOR = 3.0
+MINOR = 0
+
INSTALL = install
INSTALL_DATA = $(INSTALL) -m0644
INSTALL_PROG = $(INSTALL) -m0755
@@ -86,15 +89,20 @@ xs_test_lib.o: xs.c
talloc_test.o: talloc.c
$(COMPILE.c) -o $@ $<
-libxenstore.so: xs.opic xs_lib.opic
- $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ -lpthread
+libxenstore.so: libxenstore.so.$(MAJOR)
+ ln -sf $< $@
+libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR)
+ ln -sf $< $@
+
+libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) -shared -o $@ $^ -lpthread
-libxenstore.a: libxenstore.so
+libxenstore.a: xs.o xs_lib.o
ar rcs libxenstore.a $^
.PHONY: clean
clean: testsuite-clean
- rm -f *.o *.opic *.so
+ rm -f *.o *.opic *.so*
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_test xenstored_test xs_tdb_dump xenstore-control xenstore-ls
rm -f $(CLIENTS)
@@ -174,7 +182,9 @@ install: all
$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
- $(INSTALL_PROG) libxenstore.so* $(DESTDIR)/usr/$(LIBDIR)
+ $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
+ ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
+ ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so
$(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include