debuggers.hg

changeset 3699:09723a1de726

bitkeeper revision 1.1159.212.92 (4204921aEJqAV7p8MQEa98S3OLscXg)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Sat Feb 05 09:30:02 2005 +0000 (2005-02-05)
parents 329cc8e9e0da f9b3b23cf5ff
children 523e995bcc57
files tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile xen/arch/x86/Makefile
line diff
     1.1 --- a/tools/libxc/Makefile	Sat Feb 05 09:15:28 2005 +0000
     1.2 +++ b/tools/libxc/Makefile	Sat Feb 05 09:30:02 2005 +0000
     1.3 @@ -5,7 +5,8 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
     1.4  
     1.5  MAJOR    = 3.0
     1.6  MINOR    = 0
     1.7 -SONAME   = libxc.so.$(MAJOR)
     1.8 +LIB_NAME = libxc
     1.9 +SONAME   = $(LIB_NAME).so.$(MAJOR)
    1.10  
    1.11  CC       = gcc
    1.12  
    1.13 @@ -40,9 +41,10 @@ CFLAGS   += $(INCLUDES) -I.
    1.14  CFLAGS   += -Wp,-MD,.$(@F).d
    1.15  DEPS     = .*.d
    1.16  
    1.17 -OBJS     = $(patsubst %.c,%.o,$(SRCS))
    1.18 +OBJS     := $(patsubst %.c,%.o,$(SRCS))
    1.19 +PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
    1.20  
    1.21 -LIB      = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
    1.22 +LIB		:= $(LIB_NAME).a $(LIB_NAME).so $(LIB_NAME).so.$(MAJOR) $(LIB_NAME).so.$(MAJOR).$(MINOR)
    1.23  
    1.24  all: check-for-zlib mk-symlinks
    1.25  	$(MAKE) $(LIB)
    1.26 @@ -69,13 +71,14 @@ mk-symlinks:
    1.27  install: all
    1.28  	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) $(DESTDIR)/usr/lib
    1.29  	[ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
    1.30 -	$(INSTALL_PROG) libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
    1.31 -	ln -sf libxc.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/libxc.so.$(MAJOR)
    1.32 -	ln -sf libxc.so.$(MAJOR) $(DESTDIR)/usr/lib/libxc.so
    1.33 +	$(INSTALL_PROG) $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
    1.34 +	$(INSTALL_DATA) $(LIB_NAME).a $(DESTDIR)/usr/lib
    1.35 +	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
    1.36 +	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
    1.37  	$(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
    1.38  
    1.39  clean:
    1.40 -	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen
    1.41 +	rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
    1.42  
    1.43  rpm: all
    1.44  	rm -rf staging
    1.45 @@ -86,11 +89,17 @@ rpm: all
    1.46  	mv staging/i386/*.rpm .
    1.47  	rm -rf staging
    1.48  
    1.49 -libxc.so:
    1.50 -	ln -sf libxc.so.$(MAJOR) $@
    1.51 -libxc.so.$(MAJOR):
    1.52 -	ln -sf libxc.so.$(MAJOR).$(MINOR) $@
    1.53 -libxc.so.$(MAJOR).$(MINOR): $(OBJS)
    1.54 +$(PIC_OBJS): %.opic: %.c
    1.55 +	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
    1.56 +	
    1.57 +$(LIB_NAME).a: $(OBJS)
    1.58 +	$(AR) rc $@ $^
    1.59 +
    1.60 +$(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
    1.61 +	ln -sf $< $@
    1.62 +$(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
    1.63 +	ln -sf $< $@
    1.64 +$(LIB_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS)
    1.65  	$(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
    1.66  
    1.67  -include $(DEPS)
     2.1 --- a/tools/libxutil/Makefile	Sat Feb 05 09:15:28 2005 +0000
     2.2 +++ b/tools/libxutil/Makefile	Sat Feb 05 09:30:02 2005 +0000
     2.3 @@ -24,6 +24,7 @@ LIB_SRCS += sys_string.c
     2.4  LIB_SRCS += util.c
     2.5  
     2.6  LIB_OBJS := $(LIB_SRCS:.c=.o)
     2.7 +LIB_PIC_OBJS := $(LIB_SRCS:.c=.opic)
     2.8  
     2.9  CFLAGS   += -Wall -Werror -O3 -fno-strict-aliasing
    2.10  
    2.11 @@ -34,6 +35,7 @@ DEPS     = .*.d
    2.12  MAJOR    := 3.0
    2.13  MINOR    := 0
    2.14  LIB_NAME := libxutil
    2.15 +SO_NAME  := $(LIB_NAME).so.$(MAJOR)
    2.16  LIB      := $(LIB_NAME).so 
    2.17  LIB      += $(LIB_NAME).so.$(MAJOR)
    2.18  LIB      += $(LIB_NAME).so.$(MAJOR).$(MINOR)
    2.19 @@ -42,14 +44,17 @@ LIB      += $(LIB_NAME).a
    2.20  all: check-for-zlib
    2.21  	$(MAKE) $(LIB)
    2.22  
    2.23 +$(LIB_PIC_OBJS): %.opic: %.c
    2.24 +	$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
    2.25 +
    2.26  $(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
    2.27  	ln -sf $^ $@
    2.28  
    2.29  $(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
    2.30  	ln -sf $^ $@
    2.31  
    2.32 -$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_OBJS)
    2.33 -	$(CC) -Wl,-soname -Wl,$(LIB_NAME).so.$(MAJOR) -shared -o $@ $^
    2.34 +$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_PIC_OBJS)
    2.35 +	$(CC) -Wl,-soname -Wl,$(SO_NAME) -shared -o $@ $^
    2.36  
    2.37  $(LIB_NAME).a: $(LIB_OBJS)
    2.38  	$(AR) rc $@ $^
    2.39 @@ -65,11 +70,12 @@ check-for-zlib:
    2.40  install: all
    2.41  	[ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib
    2.42  	$(INSTALL_PROG) $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib
    2.43 +	$(INSTALL_DATA) $(LIB_NAME).a $(DESTDIR)/usr/lib
    2.44  	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
    2.45  	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
    2.46  
    2.47  clean:
    2.48 -	$(RM) *.a *.so *.so.* *.o *.rpm 
    2.49 +	$(RM) *.a *.so *.so.* *.o *.opic *.rpm 
    2.50  	$(RM) *~
    2.51  	$(RM) $(DEPS)
    2.52  
     3.1 --- a/tools/misc/Makefile	Sat Feb 05 09:15:28 2005 +0000
     3.2 +++ b/tools/misc/Makefile	Sat Feb 05 09:30:02 2005 +0000
     3.3 @@ -34,5 +34,8 @@ clean:
     3.4  	$(RM) *.o $(TARGETS) *~
     3.5  	$(MAKE) -C miniterm clean
     3.6  
     3.7 -%: %.c $(HDRS) Makefile
     3.8 +%.o: %.c $(HDRS) Makefile
     3.9 +	$(CC) -c $(CFLAGS) -o $@ $<
    3.10 +
    3.11 +$(TARGETS): %: %.o Makefile
    3.12  	$(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxc -L$(XEN_LIBXUTIL) -lxutil
     4.1 --- a/xen/arch/x86/Makefile	Sat Feb 05 09:15:28 2005 +0000
     4.2 +++ b/xen/arch/x86/Makefile	Sat Feb 05 09:30:02 2005 +0000
     4.3 @@ -41,6 +41,7 @@ clean:
     4.4  	rm -f *.o *.s *~ core boot/*.o boot/*~ boot/core boot/mkelf32
     4.5  	rm -f x86_32/*.o x86_32/*~ x86_32/core
     4.6  	rm -f x86_64/*.o x86_64/*~ x86_64/core
     4.7 +	rm -f mtrr/*.o mtrr/*~ mtrr/core
     4.8  
     4.9  # setup.o contains bits of compile.h so it must be blown away
    4.10  delete-unfresh-files: