ia64/xen-unstable

changeset 3549:dca8a77a487d

bitkeeper revision 1.1159.223.44 (41f8c832pMZZ7WmykH_gAUBQHtPF1A)

Allow target architecture to be specified by specifying ARCH variable to
root Makefile (e.g, make ARCH=x86_32).
author kaf24@scramble.cl.cam.ac.uk
date Thu Jan 27 10:53:38 2005 +0000 (2005-01-27)
parents 21ec7bbd352d
children a26c121cabd0 c0a40bca3258
files .rootkeys Makefile tools/Make.defs tools/Rules.mk tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile tools/python/Makefile tools/vnet/vnetd/Makefile tools/x2d2/Makefile tools/xentrace/Makefile tools/xfrd/Makefile
line diff
     1.1 --- a/.rootkeys	Wed Jan 26 20:15:25 2005 +0000
     1.2 +++ b/.rootkeys	Thu Jan 27 10:53:38 2005 +0000
     1.3 @@ -294,8 +294,8 @@ 413cb3b53nyOv1OIeDSsCXhBFDXvJA netbsd-2.
     1.4  413aa1d0oNP8HXLvfPuMe6cSroUfSA patches/linux-2.6.9/agpgart.patch
     1.5  413aa1d0ewvSv-ohnNnQQNGsbPTTNA patches/linux-2.6.9/drm.patch
     1.6  418abc69J3F638vPO9MYoDGeYilxoQ patches/linux-2.6.9/nettel.patch
     1.7 -40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Make.defs
     1.8  3f776bd1Hy9rn69ntXBhPReUFw9IEA tools/Makefile
     1.9 +40e1b09db5mN69Ijj0X_Eol-S7dXiw tools/Rules.mk
    1.10  4124b307nRyK3dhn1hAsvrY76NuV3g tools/check/Makefile
    1.11  4124b307vHLUWbfpemVefmaWDcdfag tools/check/README
    1.12  4124b307jt7T3CHysgl9LijNHSe1tA tools/check/check_brctl
     2.1 --- a/Makefile	Wed Jan 26 20:15:25 2005 +0000
     2.2 +++ b/Makefile	Thu Jan 27 10:53:38 2005 +0000
     2.3 @@ -21,6 +21,12 @@ XKERNELS := $(foreach kernel, $(KERNELS)
     2.4  
     2.5  export DESTDIR
     2.6  
     2.7 +# Export target architecture overrides to Xen and Linux sub-trees.
     2.8 +ifneq ($(ARCH),)
     2.9 +export TARGET_SUBARCH := $(ARCH)
    2.10 +export SUBARCH        := $(subst x86_32,i386,$(ARCH))
    2.11 +endif
    2.12 +
    2.13  include buildconfigs/Rules.mk
    2.14  
    2.15  .PHONY:	all dist install xen tools kernels docs world clean mkpatches mrproper
    2.16 @@ -36,8 +42,8 @@ install: xen checked-tools kernels docs
    2.17  
    2.18  # Only check for install req'mts on 'make install', not on 'make dist'.
    2.19  checked-tools:
    2.20 -	$(MAKE) -C tools/check install
    2.21 -	$(MAKE) -C tools install
    2.22 +	$(MAKE) ARCH=$(ARCH) -C tools/check install
    2.23 +	$(MAKE) ARCH=$(ARCH) -C tools install
    2.24  
    2.25  # build and install everything into local dist directory
    2.26  dist: xen tools kernels docs
    2.27 @@ -51,7 +57,7 @@ xen:
    2.28  	$(MAKE) -C xen install
    2.29  
    2.30  tools:
    2.31 -	$(MAKE) -C tools install
    2.32 +	$(MAKE) ARCH=$(ARCH) -C tools install
    2.33  
    2.34  kernels:
    2.35  	for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
    2.36 @@ -86,7 +92,7 @@ world:
    2.37  # clean doesn't do a kclean
    2.38  clean: 
    2.39  	$(MAKE) -C xen clean
    2.40 -	$(MAKE) -C tools clean
    2.41 +	$(MAKE) ARCH=$(ARCH) -C tools clean
    2.42  	$(MAKE) -C docs clean
    2.43  
    2.44  # clean, but blow away kernel build tree plus tar balls
     3.1 --- a/tools/Make.defs	Wed Jan 26 20:15:25 2005 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,4 +0,0 @@
     3.4 -#  -*- mode: Makefile; -*-
     3.5 -XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
     3.6 -XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     3.7 -XEN_LIBXUTIL       = $(XEN_ROOT)/tools/libxutil
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/Rules.mk	Thu Jan 27 10:53:38 2005 +0000
     4.3 @@ -0,0 +1,15 @@
     4.4 +#  -*- mode: Makefile; -*-
     4.5 +
     4.6 +XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
     4.7 +XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     4.8 +XEN_LIBXUTIL       = $(XEN_ROOT)/tools/libxutil
     4.9 +
    4.10 +ifeq ($(ARCH),x86_32)
    4.11 +CFLAGS  += -m32 -march=i686
    4.12 +LDFLAGS += -m elf_i386
    4.13 +endif
    4.14 +
    4.15 +ifeq ($(ARCH),x86_64)
    4.16 +CFLAGS  += -m64
    4.17 +LDFLAGS += -m elf_x86_64
    4.18 +endif
     5.1 --- a/tools/libxc/Makefile	Wed Jan 26 20:15:25 2005 +0000
     5.2 +++ b/tools/libxc/Makefile	Thu Jan 27 10:53:38 2005 +0000
     5.3 @@ -10,7 +10,7 @@ SONAME   = libxc.so.$(MAJOR)
     5.4  CC       = gcc
     5.5  
     5.6  XEN_ROOT = ../..
     5.7 -include $(XEN_ROOT)/tools/Make.defs
     5.8 +include $(XEN_ROOT)/tools/Rules.mk
     5.9  
    5.10  vpath %c       $(XEN_LIBXUTIL)
    5.11  INCLUDES += -I $(XEN_LIBXUTIL)
     6.1 --- a/tools/libxutil/Makefile	Wed Jan 26 20:15:25 2005 +0000
     6.2 +++ b/tools/libxutil/Makefile	Thu Jan 27 10:53:38 2005 +0000
     6.3 @@ -4,7 +4,7 @@ INSTALL_DATA	= $(INSTALL) -m0644
     6.4  INSTALL_PROG	= $(INSTALL) -m0755
     6.5  INSTALL_DIR	= $(INSTALL) -d -m0755
     6.6  
     6.7 -include $(XEN_ROOT)/tools/Make.defs
     6.8 +include $(XEN_ROOT)/tools/Rules.mk
     6.9  
    6.10  CC = gcc
    6.11  
     7.1 --- a/tools/misc/Makefile	Wed Jan 26 20:15:25 2005 +0000
     7.2 +++ b/tools/misc/Makefile	Thu Jan 27 10:53:38 2005 +0000
     7.3 @@ -3,10 +3,10 @@ INSTALL_PROG	= $(INSTALL) -m0755
     7.4  INSTALL_DIR	= $(INSTALL) -d -m0755
     7.5  
     7.6  XEN_ROOT=../..
     7.7 -include $(XEN_ROOT)/tools/Make.defs
     7.8 +include $(XEN_ROOT)/tools/Rules.mk
     7.9  
    7.10 -CC         = gcc
    7.11 -CFLAGS     = -Wall -Werror -O3 
    7.12 +CC        = gcc
    7.13 +CFLAGS   += -Wall -Werror -O3 
    7.14  
    7.15  INCLUDES += -I $(XEN_XC)
    7.16  INCLUDES += -I $(XEN_LIBXC)
    7.17 @@ -27,7 +27,8 @@ install: all
    7.18  	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
    7.19  	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
    7.20  	$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
    7.21 -	$(MAKE) -C miniterm install
    7.22 +#       No sense in installing miniterm on the Xen box.
    7.23 +#	$(MAKE) -C miniterm install
    7.24  
    7.25  clean:
    7.26  	$(RM) *.o $(TARGETS) *~
     8.1 --- a/tools/python/Makefile	Wed Jan 26 20:15:25 2005 +0000
     8.2 +++ b/tools/python/Makefile	Thu Jan 27 10:53:38 2005 +0000
     8.3 @@ -1,9 +1,12 @@
     8.4 +
     8.5 +XEN_ROOT = ../..
     8.6 +include $(XEN_ROOT)/tools/Rules.mk
     8.7  
     8.8  all:
     8.9 -	python setup.py build
    8.10 +	CFLAGS="$(CFLAGS)" python setup.py build
    8.11  
    8.12  install: all
    8.13 -	python setup.py install --home="$(DESTDIR)/usr"
    8.14 +	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr"
    8.15  
    8.16  clean:
    8.17  	rm -rf build *.pyc *.pyo *.o *.a *~
     9.1 --- a/tools/vnet/vnetd/Makefile	Wed Jan 26 20:15:25 2005 +0000
     9.2 +++ b/tools/vnet/vnetd/Makefile	Thu Jan 27 10:53:38 2005 +0000
     9.3 @@ -21,7 +21,7 @@ all: vnetd
     9.4  #----------------------------------------------------------------------------
     9.5  
     9.6  XEN_ROOT  = ../../..
     9.7 -include $(XEN_ROOT)/tools/Make.defs
     9.8 +include $(XEN_ROOT)/tools/Rules.mk
     9.9  
    9.10  VNETD_INSTALL_DIR = /usr/sbin
    9.11  
    10.1 --- a/tools/x2d2/Makefile	Wed Jan 26 20:15:25 2005 +0000
    10.2 +++ b/tools/x2d2/Makefile	Thu Jan 27 10:53:38 2005 +0000
    10.3 @@ -1,8 +1,8 @@
    10.4  XEN_ROOT=../..
    10.5 -include $(XEN_ROOT)/tools/Make.defs
    10.6 +include $(XEN_ROOT)/tools/Rules.mk
    10.7  
    10.8  CC       = gcc
    10.9 -CFLAGS   = -Wall -Werror -O3 -fno-strict-aliasing
   10.10 +CFLAGS  += -Wall -Werror -O3 -fno-strict-aliasing
   10.11  
   10.12  CFLAGS  += -I $(XEN_XC)
   10.13  CFLAGS  += -I $(XEN_LIBXC)
    11.1 --- a/tools/xentrace/Makefile	Wed Jan 26 20:15:25 2005 +0000
    11.2 +++ b/tools/xentrace/Makefile	Thu Jan 27 10:53:38 2005 +0000
    11.3 @@ -4,10 +4,10 @@ INSTALL_DIR	= $(INSTALL) -d -m0755
    11.4  INSTALL_DATA	= $(INSTALL) -m0644
    11.5  
    11.6  XEN_ROOT=../..
    11.7 -include $(XEN_ROOT)/tools/Make.defs
    11.8 +include $(XEN_ROOT)/tools/Rules.mk
    11.9  
   11.10  CC       = gcc
   11.11 -CFLAGS   = -Wall -Werror -O3
   11.12 +CFLAGS  += -Wall -Werror -O3
   11.13  
   11.14  CFLAGS  += -I $(XEN_XC)
   11.15  CFLAGS  += -I $(XEN_LIBXC)
    12.1 --- a/tools/xfrd/Makefile	Wed Jan 26 20:15:25 2005 +0000
    12.2 +++ b/tools/xfrd/Makefile	Thu Jan 27 10:53:38 2005 +0000
    12.3 @@ -9,7 +9,7 @@ INSTALL_PROG	= $(INSTALL) -m0755
    12.4  INSTALL_DIR	= $(INSTALL) -d -m0755
    12.5  
    12.6  XEN_ROOT  = ../..
    12.7 -include $(XEN_ROOT)/tools/Make.defs
    12.8 +include $(XEN_ROOT)/tools/Rules.mk
    12.9  
   12.10  XFRD_INSTALL_DIR = /usr/sbin
   12.11