ia64/xen-unstable

changeset 16825:5b9b3b41fe89

Make tools/Makefile cross-friendly

Pass Xen cross-compilation options through to ioemu.
Export CROSS_SYS_ROOT for use by scripts. Unexport
IOEMU_DIR since it isn't used outside of the Makefile.

Signed-off-by: Aron Griffis <aron@hp.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 22 09:43:53 2008 +0000 (2008-01-22)
parents 6fed70d658ea
children 6ba04ec03dec
files tools/Makefile
line diff
     1.1 --- a/tools/Makefile	Mon Jan 21 14:39:33 2008 +0000
     1.2 +++ b/tools/Makefile	Tue Jan 22 09:43:53 2008 +0000
     1.3 @@ -28,6 +28,12 @@ SUBDIRS-$(PYTHON_TOOLS) += python
     1.4  SUBDIRS-$(PYTHON_TOOLS) += pygrub
     1.5  endif
     1.6  
     1.7 +# For the sake of linking, set the sys-root
     1.8 +ifneq ($(CROSS_COMPILE),)
     1.9 +CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
    1.10 +export CROSS_SYS_ROOT
    1.11 +endif
    1.12 +
    1.13  .PHONY: all
    1.14  all: check
    1.15  	@set -e; for subdir in $(SUBDIRS-y); do \
    1.16 @@ -65,10 +71,15 @@ check_clean:
    1.17  
    1.18  .PHONY: ioemu ioemuinstall ioemuclean
    1.19  ifeq ($(CONFIG_IOEMU),y)
    1.20 -export IOEMU_DIR ?= ioemu
    1.21 +IOEMU_DIR ?= ioemu
    1.22 +ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
    1.23 +IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \
    1.24 +			 --interp-prefix=$(CROSS_SYS_ROOT)
    1.25 +endif
    1.26  ioemu ioemuinstall:
    1.27  	[ -f $(IOEMU_DIR)/config-host.mak ] || \
    1.28 -	  (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
    1.29 +	  ( cd $(IOEMU_DIR) && sh configure --prefix=/usr \
    1.30 +		$(IOEMU_CONFIGURE_CROSS) )
    1.31  	$(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@)
    1.32  ioemuclean:
    1.33  	$(MAKE) -C $(IOEMU_DIR) distclean