[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Makefile:



ChangeSet 1.1713.1.15, 2005/06/17 10:23:57+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        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@xxxxxxxxxxxx>



 Makefile          |    1 -
 libxc/Makefile    |    6 +++++-
 python/setup.py   |    2 +-
 xenstore/Makefile |   23 ++++++++++++++++-------
 4 files changed, 22 insertions(+), 10 deletions(-)


diff -Nru a/tools/Makefile b/tools/Makefile
--- a/tools/Makefile    2005-06-17 21:02:56 -04:00
+++ b/tools/Makefile    2005-06-17 21:02:56 -04:00
@@ -10,7 +10,6 @@
 SUBDIRS += python
 SUBDIRS += xcs
 SUBDIRS += xcutils
-SUBDIRS += xenstore
 SUBDIRS += pygrub
 SUBDIRS += firmware
 
diff -Nru a/tools/libxc/Makefile b/tools/libxc/Makefile
--- a/tools/libxc/Makefile      2005-06-17 21:02:56 -04:00
+++ b/tools/libxc/Makefile      2005-06-17 21:02:56 -04:00
@@ -44,7 +44,8 @@
 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
@@ -96,6 +97,9 @@
        rm -rf staging
 
 libxc.a: $(LIB_OBJS)
+       $(AR) rc $@ $^
+
+libxc-pic.a: $(PIC_OBJS)
        $(AR) rc $@ $^
 
 libxc.so: libxc.so.$(MAJOR)
diff -Nru a/tools/python/setup.py b/tools/python/setup.py
--- a/tools/python/setup.py     2005-06-17 21:02:56 -04:00
+++ b/tools/python/setup.py     2005-06-17 21:02:56 -04:00
@@ -17,7 +17,7 @@
                  XEN_ROOT + "/tools/xenstore",
                  ]
 
-libraries = [ "xc", "xenstore" ]
+libraries = [ "xc", "xenstore-pic" ]
 
 xc = Extension("xc",
                extra_compile_args = extra_compile_args,
diff -Nru a/tools/xenstore/Makefile b/tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   2005-06-17 21:02:56 -04:00
+++ b/tools/xenstore/Makefile   2005-06-17 21:02:56 -04:00
@@ -20,15 +20,12 @@
 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 @@
 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 @@
 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_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:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.