diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-12 15:59:34 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-12 15:59:34 +0000 |
commit | 2d76e4deef42d81f7e516ebf9372a131bb6ae063 (patch) | |
tree | 4cec49e4822b9132fd17a9a77932fc6bbd6edd8f | |
parent | ba60fd7a8f6ad3f19259ac91dba23966318a6630 (diff) | |
download | xen-2d76e4deef42d81f7e516ebf9372a131bb6ae063.tar.gz xen-2d76e4deef42d81f7e516ebf9372a131bb6ae063.tar.bz2 xen-2d76e4deef42d81f7e516ebf9372a131bb6ae063.zip |
Build xenstore interface as shared library.
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | tools/python/setup.py | 2 | ||||
-rw-r--r-- | tools/xenstore/Makefile | 21 |
2 files changed, 8 insertions, 15 deletions
diff --git a/tools/python/setup.py b/tools/python/setup.py index c2c5448d5e..fdf9a39a40 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -17,7 +17,7 @@ library_dirs = [ XEN_ROOT + "/tools/libxc", XEN_ROOT + "/tools/xenstore", ] -libraries = [ "xc", "xenstore-pic" ] +libraries = [ "xc", "xenstore" ] xc = Extension("xc", extra_compile_args = extra_compile_args, diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index 915f4de04b..db0d039292 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -24,7 +24,7 @@ TESTDIR = `pwd`/testsuite/tmp TESTFLAGS= -DTESTING TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR) -all: xen xenstored libxenstore.a libxenstore-pic.a +all: xen xenstored libxenstore.so testcode: xen xs_test xenstored_test xs_random xs_dom0_test @@ -53,20 +53,14 @@ xs_test_lib.o: xs.c talloc_test.o: talloc.c $(COMPILE.c) -o $@ $< -LIB_OBJS := xs.o xs_lib.o - -LIB_OBJS_A := $(patsubst %.o,libxenstore.a(%.o),$(LIB_OBJS)) -LIB_OBJS_PIC := $(patsubst %.o,libxenstore-pic.a(%.opic),$(LIB_OBJS)) - -libxenstore.a: $(LIB_OBJS_A) - -libxenstore-pic.a: $(LIB_OBJS_PIC) +libxenstore.so: xs.opic xs_lib.opic + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ clean: testsuite-clean - rm -f *.o *.opic *.a + rm -f *.o *.opic *.so rm -f xen xenstored xs_random xs_stress xs_crashme rm -f xs_test xenstored_test xs_dom0_test - -$(RM) $(PROG_DEP) + $(RM) $(PROG_DEP) print-dir: @echo -n tools/xenstore: @@ -117,15 +111,14 @@ TAGS: tarball: clean cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/ -install: xenstored libxenstore.a libxenstore-pic.a +install: xenstored libxenstore.so $(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored $(INSTALL_DIR) -p $(DESTDIR)/usr/sbin $(INSTALL_DIR) -p $(DESTDIR)/usr/include $(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_DATA) libxenstore-pic.a $(DESTDIR)/usr/$(LIBDIR) + $(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR) $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include |