--- xen-unstable.hg/tools/xenstore/Makefile.versioned-lib 2006-07-13 15:39:15.000000000 +0100 +++ xen-unstable.hg/tools/xenstore/Makefile 2006-07-20 10:37:57.000000000 +0100 @@ -2,6 +2,9 @@ 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 @@ -35,7 +38,7 @@ XENSTORED_OBJS += $(XENSTORED_$(OS)) .PHONY: all -all: libxenstore.so xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls +all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls test_interleaved_transactions: test_interleaved_transactions.o $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@ @@ -87,12 +90,20 @@ 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.a: xs.o xs_lib.o + $(AR) rc $@ $^ + +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 .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) @@ -172,7 +183,10 @@ $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_LIBS) libxenstore.so $(DESTDIR)/usr/$(LIBDIR) + $(INSTALL_LIBS) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) + $(INSTALL_LIBS) libxenstore.a $(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) xs.h $(DESTDIR)/usr/include $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include