ia64/xen-unstable

changeset 6142:ba46bd7f5cdf

Build xenstore interface as shared library.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Aug 12 15:59:34 2005 +0000 (2005-08-12)
parents 7c2fdcb2c933
children 4995d5f167c9 6893bc5cc225 40b887fa79d0
files tools/python/setup.py tools/xenstore/Makefile
line diff
     1.1 --- a/tools/python/setup.py	Fri Aug 12 14:53:26 2005 +0000
     1.2 +++ b/tools/python/setup.py	Fri Aug 12 15:59:34 2005 +0000
     1.3 @@ -17,7 +17,7 @@ library_dirs = [ XEN_ROOT + "/tools/libx
     1.4                   XEN_ROOT + "/tools/xenstore",
     1.5                   ]
     1.6  
     1.7 -libraries = [ "xc", "xenstore-pic" ]
     1.8 +libraries = [ "xc", "xenstore" ]
     1.9  
    1.10  xc = Extension("xc",
    1.11                 extra_compile_args = extra_compile_args,
     2.1 --- a/tools/xenstore/Makefile	Fri Aug 12 14:53:26 2005 +0000
     2.2 +++ b/tools/xenstore/Makefile	Fri Aug 12 15:59:34 2005 +0000
     2.3 @@ -24,7 +24,7 @@ TESTDIR  = `pwd`/testsuite/tmp
     2.4  TESTFLAGS= -DTESTING
     2.5  TESTENV  = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
     2.6  
     2.7 -all: xen xenstored libxenstore.a libxenstore-pic.a
     2.8 +all: xen xenstored libxenstore.so
     2.9  
    2.10  testcode: xen xs_test xenstored_test xs_random xs_dom0_test
    2.11  
    2.12 @@ -53,20 +53,14 @@ xs_test_lib.o: xs.c
    2.13  talloc_test.o: talloc.c
    2.14  	$(COMPILE.c) -o $@ $<
    2.15  
    2.16 -LIB_OBJS     := xs.o xs_lib.o
    2.17 -
    2.18 -LIB_OBJS_A   := $(patsubst %.o,libxenstore.a(%.o),$(LIB_OBJS))
    2.19 -LIB_OBJS_PIC := $(patsubst %.o,libxenstore-pic.a(%.opic),$(LIB_OBJS))
    2.20 -
    2.21 -libxenstore.a: $(LIB_OBJS_A)
    2.22 -
    2.23 -libxenstore-pic.a: $(LIB_OBJS_PIC)
    2.24 +libxenstore.so: xs.opic xs_lib.opic
    2.25 +	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^
    2.26  
    2.27  clean: testsuite-clean
    2.28 -	rm -f *.o *.opic *.a
    2.29 +	rm -f *.o *.opic *.so
    2.30  	rm -f xen xenstored xs_random xs_stress xs_crashme
    2.31  	rm -f xs_test xenstored_test xs_dom0_test
    2.32 -	-$(RM) $(PROG_DEP)
    2.33 +	$(RM) $(PROG_DEP)
    2.34  
    2.35  print-dir:
    2.36  	@echo -n tools/xenstore: 
    2.37 @@ -117,15 +111,14 @@ TAGS:
    2.38  tarball: clean
    2.39  	cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
    2.40  
    2.41 -install: xenstored libxenstore.a libxenstore-pic.a
    2.42 +install: xenstored libxenstore.so
    2.43  	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
    2.44  	$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
    2.45  	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
    2.46  	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
    2.47  	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
    2.48  	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
    2.49 -	$(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
    2.50 -	$(INSTALL_DATA) libxenstore-pic.a $(DESTDIR)/usr/$(LIBDIR)
    2.51 +	$(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
    2.52  	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
    2.53  	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
    2.54