aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-17 09:23:57 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-17 09:23:57 +0000
commitb68bddb48084b67eae67c9a794db4d28cb64d2f9 (patch)
treedac65bbcbb4afbc756f9dd1ac7e679aabe8604c4
parent128fb33d1bdf485fc1641e81deb6d87b589a7f7a (diff)
downloadxen-b68bddb48084b67eae67c9a794db4d28cb64d2f9.tar.gz
xen-b68bddb48084b67eae67c9a794db4d28cb64d2f9.tar.bz2
xen-b68bddb48084b67eae67c9a794db4d28cb64d2f9.zip
bitkeeper revision 1.1713.3.2 (42b296adTFf-i3SL6NuYF5MX4ai91Q)
Makefile: Build libxenstore-pic.a. setup.py: Link with libxenstore-pic.a. Makefile: Build libxc-pic.a. Build xenstore once is enough. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
-rw-r--r--tools/Makefile1
-rw-r--r--tools/libxc/Makefile6
-rw-r--r--tools/python/setup.py2
-rw-r--r--tools/xenstore/Makefile23
4 files changed, 22 insertions, 10 deletions
diff --git a/tools/Makefile b/tools/Makefile
index b122ba465a..3a38e899de 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -10,7 +10,6 @@ SUBDIRS += xentrace
SUBDIRS += python
SUBDIRS += xcs
SUBDIRS += xcutils
-SUBDIRS += xenstore
SUBDIRS += pygrub
SUBDIRS += firmware
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index cbe7983a44..e8c6058b7d 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -44,7 +44,8 @@ DEPS = .*.d
LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
-LIB := libxc.a libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
+LIB := libxc.a libxc-pic.a
+LIB += libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
all: build
build: check-for-zlib mk-symlinks
@@ -98,6 +99,9 @@ rpm: build
libxc.a: $(LIB_OBJS)
$(AR) rc $@ $^
+libxc-pic.a: $(PIC_OBJS)
+ $(AR) rc $@ $^
+
libxc.so: libxc.so.$(MAJOR)
ln -sf $< $@
libxc.so.$(MAJOR): libxc.so.$(MAJOR).$(MINOR)
diff --git a/tools/python/setup.py b/tools/python/setup.py
index fabe80bd8b..e2a5b09ca1 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" ]
+libraries = [ "xc", "xenstore-pic" ]
xc = Extension("xc",
extra_compile_args = extra_compile_args,
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 408078efba..3bfe8cb957 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -20,15 +20,12 @@ BASECFLAGS+= -I$(XEN_ROOT)/xen/include/public
BASECFLAGS+= -I.
CFLAGS += $(BASECFLAGS)
-ifeq ($(XEN_TARGET_ARCH),x86_64)
-CFLAGS += -fPIC
-endif
LDFLAGS=$(PROFILE) -L$(XEN_LIBXC)
TESTDIR=`pwd`/testsuite/tmp
TESTFLAGS=-DTESTING
TESTENV=XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
-all: xen xenstored libxenstore.a
+all: xen xenstored libxenstore.a libxenstore-pic.a
testcode: xen xs_test xenstored_test xs_random
@@ -56,10 +53,18 @@ xs_test_lib.o: xs.c
talloc_test.o: talloc.c
$(COMPILE.c) -o $@ $<
-libxenstore.a: libxenstore.a(xs.o) libxenstore.a(xs_lib.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)
clean: testsuite-clean
- rm -f *.o *.a xs_test xenstored xenstored_test xs_random xs_stress xen
+ rm -f *.o *.opic *.a
+ rm -f xs_test xenstored xenstored_test xs_random xs_stress xen
-$(RM) $(PROG_DEP)
check: testsuite-run randomcheck stresstest
@@ -88,7 +93,7 @@ TAGS:
tarball: clean
cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
-install: xenstored libxenstore.a
+install: xenstored libxenstore.a libxenstore-pic.a
$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
@@ -96,7 +101,11 @@ install: xenstored libxenstore.a
$(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) xs.h $(DESTDIR)/usr/include
$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
-include $(PROG_DEP)
+
+# never delete any intermediate files.
+.SECONDARY: