debuggers.hg

view tools/Makefile @ 17991:20215b87d0f3

Support building of out-of-tree merged qemu from git

This provides support for building the new merged qemu from
qemu-xen.git, or from a local checkout.

The default is still to use the in-tree version, because the patchman
infrastructure for testing, and propagation from staging to
xen-unstable, needs a small amount of work to cope with git.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jul 03 10:44:13 2008 +0100 (2008-07-03)
parents 5b4dad214f91
children edd6969f609c
line source
1 XEN_ROOT = ../
2 include $(XEN_ROOT)/tools/Rules.mk
4 SUBDIRS-y :=
5 SUBDIRS-y += check
6 SUBDIRS-y += include
7 SUBDIRS-y += libxc
8 SUBDIRS-y += flask
9 SUBDIRS-y += xenstore
10 SUBDIRS-y += misc
11 SUBDIRS-y += examples
12 SUBDIRS-y += xentrace
13 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
14 SUBDIRS-$(CONFIG_X86) += firmware
15 SUBDIRS-$(ACM_SECURITY) += security
16 SUBDIRS-y += console
17 SUBDIRS-y += xenmon
18 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
19 SUBDIRS-$(VTPM_TOOLS) += vtpm
20 SUBDIRS-y += xenstat
21 SUBDIRS-y += libaio
22 SUBDIRS-y += blktap
23 SUBDIRS-y += libfsimage
24 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
26 ifeq (ioemu,$(CONFIG_QEMU))
27 SUBDIRS-$(CONFIG_IOEMU) += ioemu
28 else
29 SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
30 endif
32 # These don't cross-compile
33 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
34 SUBDIRS-$(PYTHON_TOOLS) += python
35 SUBDIRS-$(PYTHON_TOOLS) += pygrub
36 endif
38 # For the sake of linking, set the sys-root
39 ifneq ($(CROSS_COMPILE),)
40 CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
41 export CROSS_SYS_ROOT
42 endif
44 .PHONY: all
45 all: subdirs-all
47 .PHONY: install
48 install: subdirs-install
49 $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
50 $(INSTALL_DIR) $(DESTDIR)/var/log/xen
51 $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
53 .PHONY: clean distclean
54 clean distclean: subdirs-clean
56 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
57 IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \
58 --interp-prefix=$(CROSS_SYS_ROOT)
59 endif
61 ioemu/config-host.mak:
62 cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure --prefix=/usr \
63 $(IOEMU_CONFIGURE_CROSS)
65 subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
67 subdir-clean-ioemu:
68 $(MAKE) -C ioemu distclean
70 ioemu-dir-find:
71 set -ex; \
72 if test -d $(CONFIG_QEMU); then \
73 rm -f ioemu-dir; \
74 ln -sf $(CONFIG_QEMU) ioemu-dir; \
75 else \
76 if [ ! -d ioemu-remote ]; then \
77 rm -rf ioemu-remote ioemu-remote.tmp; \
78 mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
79 $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
80 mv ioemu-remote.tmp ioemu-remote; \
81 fi; \
82 ln -sf ioemu-remote ioemu-dir; \
83 fi
84 set -e; \
85 case "$XEN_ROOT" in \
86 /*) XEN_ROOT=$(XEN_ROOT) ;; \
87 *) XEN_ROOT=`pwd`/$(XEN_ROOT) ;; \
88 esac; \
89 export XEN_ROOT; \
90 cd ioemu-dir; \
91 ./xen-setup
93 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find