ia64/xen-unstable

changeset 5475:dc7af888ebf0

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>
author cl349@firebug.cl.cam.ac.uk
date Fri Jun 17 09:23:57 2005 +0000 (2005-06-17)
parents d4ad447e470b
children 8db14a919e01
files tools/Makefile tools/libxc/Makefile tools/python/setup.py tools/xenstore/Makefile
line diff
     1.1 --- a/tools/Makefile	Fri Jun 17 08:47:00 2005 +0000
     1.2 +++ b/tools/Makefile	Fri Jun 17 09:23:57 2005 +0000
     1.3 @@ -10,7 +10,6 @@ SUBDIRS += xentrace
     1.4  SUBDIRS += python
     1.5  SUBDIRS += xcs
     1.6  SUBDIRS += xcutils
     1.7 -SUBDIRS += xenstore
     1.8  SUBDIRS += pygrub
     1.9  SUBDIRS += firmware
    1.10  
     2.1 --- a/tools/libxc/Makefile	Fri Jun 17 08:47:00 2005 +0000
     2.2 +++ b/tools/libxc/Makefile	Fri Jun 17 09:23:57 2005 +0000
     2.3 @@ -44,7 +44,8 @@ DEPS     = .*.d
     2.4  LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
     2.5  PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
     2.6  
     2.7 -LIB      := libxc.a libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
     2.8 +LIB      := libxc.a libxc-pic.a
     2.9 +LIB      += libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
    2.10  
    2.11  all: build
    2.12  build: check-for-zlib mk-symlinks
    2.13 @@ -98,6 +99,9 @@ rpm: build
    2.14  libxc.a: $(LIB_OBJS)
    2.15  	$(AR) rc $@ $^
    2.16  
    2.17 +libxc-pic.a: $(PIC_OBJS)
    2.18 +	$(AR) rc $@ $^
    2.19 +
    2.20  libxc.so: libxc.so.$(MAJOR)
    2.21  	ln -sf $< $@
    2.22  libxc.so.$(MAJOR): libxc.so.$(MAJOR).$(MINOR)
     3.1 --- a/tools/python/setup.py	Fri Jun 17 08:47:00 2005 +0000
     3.2 +++ b/tools/python/setup.py	Fri Jun 17 09:23:57 2005 +0000
     3.3 @@ -17,7 +17,7 @@ library_dirs = [ XEN_ROOT + "/tools/libx
     3.4                   XEN_ROOT + "/tools/xenstore",
     3.5                   ]
     3.6  
     3.7 -libraries = [ "xc", "xenstore" ]
     3.8 +libraries = [ "xc", "xenstore-pic" ]
     3.9  
    3.10  xc = Extension("xc",
    3.11                 extra_compile_args = extra_compile_args,
     4.1 --- a/tools/xenstore/Makefile	Fri Jun 17 08:47:00 2005 +0000
     4.2 +++ b/tools/xenstore/Makefile	Fri Jun 17 09:23:57 2005 +0000
     4.3 @@ -20,15 +20,12 @@ BASECFLAGS+= -I$(XEN_ROOT)/xen/include/p
     4.4  BASECFLAGS+= -I.
     4.5  
     4.6  CFLAGS += $(BASECFLAGS)
     4.7 -ifeq ($(XEN_TARGET_ARCH),x86_64)
     4.8 -CFLAGS += -fPIC
     4.9 -endif
    4.10  LDFLAGS=$(PROFILE) -L$(XEN_LIBXC)
    4.11  TESTDIR=`pwd`/testsuite/tmp
    4.12  TESTFLAGS=-DTESTING
    4.13  TESTENV=XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
    4.14  
    4.15 -all: xen xenstored libxenstore.a
    4.16 +all: xen xenstored libxenstore.a libxenstore-pic.a
    4.17  
    4.18  testcode: xen xs_test xenstored_test xs_random
    4.19  
    4.20 @@ -56,10 +53,18 @@ xs_test_lib.o: xs.c
    4.21  talloc_test.o: talloc.c
    4.22  	$(COMPILE.c) -o $@ $<
    4.23  
    4.24 -libxenstore.a: libxenstore.a(xs.o) libxenstore.a(xs_lib.o)
    4.25 +LIB_OBJS     := xs.o xs_lib.o
    4.26 +
    4.27 +LIB_OBJS_A   := $(patsubst %.o,libxenstore.a(%.o),$(LIB_OBJS))
    4.28 +LIB_OBJS_PIC := $(patsubst %.o,libxenstore-pic.a(%.opic),$(LIB_OBJS))
    4.29 +
    4.30 +libxenstore.a: $(LIB_OBJS_A)
    4.31 +
    4.32 +libxenstore-pic.a: $(LIB_OBJS_PIC)
    4.33  
    4.34  clean: testsuite-clean
    4.35 -	rm -f *.o *.a xs_test xenstored xenstored_test xs_random xs_stress xen
    4.36 +	rm -f *.o *.opic *.a
    4.37 +	rm -f xs_test xenstored xenstored_test xs_random xs_stress xen
    4.38  	-$(RM) $(PROG_DEP)
    4.39  
    4.40  check: testsuite-run randomcheck stresstest
    4.41 @@ -88,7 +93,7 @@ TAGS:
    4.42  tarball: clean
    4.43  	cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
    4.44  
    4.45 -install: xenstored libxenstore.a
    4.46 +install: xenstored libxenstore.a libxenstore-pic.a
    4.47  	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
    4.48  	$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
    4.49  	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
    4.50 @@ -96,7 +101,11 @@ install: xenstored libxenstore.a
    4.51  	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
    4.52  	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
    4.53  	$(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
    4.54 +	$(INSTALL_DATA) libxenstore-pic.a $(DESTDIR)/usr/$(LIBDIR)
    4.55  	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
    4.56  	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
    4.57  
    4.58  -include $(PROG_DEP)
    4.59 +
    4.60 +# never delete any intermediate files.
    4.61 +.SECONDARY: