ia64/xen-unstable

annotate Makefile @ 18788:07d0be88571f

hvm: fix single stepping on debugger

The debuggee domain will die with unexpected trap
on single stepping of emulated instruction.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 11 11:47:03 2008 +0000 (2008-11-11)
parents b53b02976633
children d6889b3b6423
rev   line source
kaf24@1446 1 #
kaf24@424 2 # Grand Unified Makefile for Xen.
kaf24@424 3 #
kaf24@424 4
kaf24@5199 5 # Default target must appear before any include lines
kaf24@9660 6 .PHONY: all
kaf24@5199 7 all: dist
kaf24@5199 8
kfraser@10232 9 export XEN_ROOT=$(CURDIR)
kaf24@4252 10 include Config.mk
kfraser@13463 11
kfraser@13463 12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
kfraser@13463 13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
kaf24@2978 14 include buildconfigs/Rules.mk
iap10@2835 15
cl349@3561 16 # build and install everything into the standard system directories
kaf24@9660 17 .PHONY: install
keir@18055 18 install: install-xen install-kernels install-tools install-stubdom install-docs
iap10@3514 19
kaf24@9660 20 .PHONY: build
ian@13740 21 build: kernels
doogie@4109 22 $(MAKE) -C xen build
doogie@4109 23 $(MAKE) -C tools build
keir@18014 24 $(MAKE) -C stubdom build
keir@18330 25 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 26 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
keir@18330 27 endif
doogie@4109 28 $(MAKE) -C docs build
doogie@4109 29
emellor@7244 30 # The test target is for unit tests that can run without an installation. Of
emellor@7244 31 # course, many tests require a machine running Xen itself, and these are
emellor@7244 32 # handled elsewhere.
kaf24@9660 33 .PHONY: test
emellor@7244 34 test:
emellor@7244 35 $(MAKE) -C tools/python test
emellor@7244 36
iap10@2836 37 # build and install everything into local dist directory
kaf24@9660 38 .PHONY: dist
kaf24@7225 39 dist: DESTDIR=$(DISTDIR)/install
keir@18055 40 dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs
iap10@3534 41 $(INSTALL_DIR) $(DISTDIR)/check
iap10@3534 42 $(INSTALL_DATA) ./COPYING $(DISTDIR)
iap10@3534 43 $(INSTALL_DATA) ./README $(DISTDIR)
iap10@3534 44 $(INSTALL_PROG) ./install.sh $(DISTDIR)
keir@16892 45 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
kaf24@7225 46 dist-%: DESTDIR=$(DISTDIR)/install
kaf24@7225 47 dist-%: install-%
kaf24@7225 48 @: # do nothing
iap10@1527 49
kaf24@7225 50 # Legacy dist targets
keir@18014 51 .PHONY: xen tools stubdom kernels docs
kaf24@7225 52 xen: dist-xen
kaf24@7225 53 tools: dist-tools
kaf24@7225 54 kernels: dist-kernels
keir@18014 55 stubdom: dist-stubdom
kaf24@7225 56 docs: dist-docs
kaf24@7225 57
kaf24@9660 58 .PHONY: prep-kernels
vhanquez@8312 59 prep-kernels:
vhanquez@8312 60 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
vhanquez@8312 61
kaf24@9660 62 .PHONY: install-xen
ian@13740 63 install-xen:
kaf24@3537 64 $(MAKE) -C xen install
iap10@2842 65
kaf24@9660 66 .PHONY: install-tools
keir@18496 67 install-tools: tools/ioemu-dir
kaf24@3551 68 $(MAKE) -C tools install
iap10@2842 69
kaf24@9660 70 .PHONY: install-kernels
kaf24@7225 71 install-kernels:
kaf24@7313 72 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
cl349@2443 73
keir@18014 74 .PHONY: install-stubdom
keir@18496 75 install-stubdom: tools/ioemu-dir
keir@18014 76 $(MAKE) -C stubdom install
keir@18330 77 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 78 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
keir@18330 79 endif
keir@18014 80
keir@18496 81 tools/ioemu-dir:
keir@18543 82 $(MAKE) -C tools ioemu-dir-find
keir@18496 83
kaf24@9660 84 .PHONY: install-docs
kaf24@7225 85 install-docs:
kaf24@3537 86 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
iap10@2842 87
kaf24@9660 88 .PHONY: dev-docs
ewan@6783 89 dev-docs:
ewan@6783 90 $(MAKE) -C docs dev-docs
ewan@6783 91
kaf24@2978 92 # Build all the various kernels and modules
kaf24@9660 93 .PHONY: kbuild
cl349@2858 94 kbuild: kernels
cl349@2858 95
iap10@2842 96 # Delete the kernel build trees entirely
kaf24@9660 97 .PHONY: kdelete
iap10@3514 98 kdelete:
iap10@3514 99 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@2842 100
iap10@2842 101 # Clean the kernel build trees
kaf24@9660 102 .PHONY: kclean
iap10@3514 103 kclean:
iap10@3514 104 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
cl349@2443 105
iap10@1468 106 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
iap10@1468 107 # and place them in the install directory. 'make install' should then
iap10@1468 108 # copy them to the normal system directories
kaf24@9660 109 .PHONY: world
iap10@2842 110 world:
iap10@1558 111 $(MAKE) clean
iap10@2835 112 $(MAKE) kdelete
iap10@2845 113 $(MAKE) dist
iap10@1464 114
iap10@2842 115 # clean doesn't do a kclean
kaf24@9660 116 .PHONY: clean
keir@16275 117 clean::
iap10@3514 118 $(MAKE) -C xen clean
kaf24@3551 119 $(MAKE) -C tools clean
keir@18014 120 $(MAKE) -C stubdom crossclean
keir@18330 121 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 122 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
keir@18330 123 endif
iap10@3514 124 $(MAKE) -C docs clean
kaf24@1446 125
kaf24@6906 126 # clean, but blow away kernel build tree plus tarballs
kaf24@9660 127 .PHONY: distclean
kaf24@10540 128 distclean:
kaf24@10540 129 $(MAKE) -C xen distclean
kaf24@10540 130 $(MAKE) -C tools distclean
keir@18014 131 $(MAKE) -C stubdom distclean
keir@18330 132 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18330 133 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
keir@18330 134 endif
kaf24@10540 135 $(MAKE) -C docs distclean
iap10@2900 136 rm -rf dist patches/tmp
iap10@3514 137 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
kaf24@10640 138 rm -rf patches/*/.makedep
iap10@1464 139
kaf24@6906 140 # Linux name for GNU distclean
kaf24@9660 141 .PHONY: mrproper
kaf24@6906 142 mrproper: distclean
kaf24@6906 143
keir@17493 144 # Prepare for source tarball
keir@17493 145 .PHONY: src-tarball
keir@17493 146 src-tarball: distclean
keir@17493 147 $(MAKE) -C xen .banner
keir@17494 148 rm -rf xen/tools/figlet .[a-z]*
keir@17493 149 $(MAKE) -C xen distclean
keir@17493 150
kaf24@9660 151 .PHONY: help
mwilli2@3376 152 help:
mwilli2@3376 153 @echo 'Installation targets:'
kaf24@3537 154 @echo ' install - build and install everything'
cl349@3561 155 @echo ' install-xen - build and install the Xen hypervisor'
cl349@3561 156 @echo ' install-tools - build and install the control tools'
cl349@3561 157 @echo ' install-kernels - build and install guest kernels'
keir@18014 158 @echo ' install-stubdom - build and install the stubdomain images'
emellor@6792 159 @echo ' install-docs - build and install user documentation'
mwilli2@3376 160 @echo ''
mwilli2@3376 161 @echo 'Building targets:'
kaf24@3537 162 @echo ' dist - build and install everything into local dist directory'
mwilli2@3376 163 @echo ' world - clean everything, delete guest kernel build'
mwilli2@3376 164 @echo ' trees then make dist'
kaf24@3537 165 @echo ' xen - build and install Xen hypervisor'
kaf24@3537 166 @echo ' tools - build and install tools'
keir@18250 167 @echo ' stubdom - build and install the stubdomain images'
kaf24@3537 168 @echo ' kernels - build and install guest kernels'
mwilli2@3376 169 @echo ' kbuild - synonym for make kernels'
emellor@6792 170 @echo ' docs - build and install user documentation'
emellor@6792 171 @echo ' dev-docs - build developer-only documentation'
mwilli2@3376 172 @echo ''
mwilli2@3376 173 @echo 'Cleaning targets:'
kaf24@9653 174 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
kaf24@9653 175 @echo ' distclean - clean plus delete kernel build trees and'
kaf24@9653 176 @echo ' local downloaded files'
mwilli2@3376 177 @echo ' kdelete - delete guest kernel build trees'
mwilli2@3376 178 @echo ' kclean - clean guest kernel build trees'
mwilli2@3376 179 @echo ''
mwilli2@3376 180 @echo 'Miscellaneous targets:'
vhanquez@8312 181 @echo ' prep-kernels - prepares kernel directories, does not build'
kaf24@9653 182 @echo ' uninstall - attempt to remove installed Xen tools'
kaf24@9653 183 @echo ' (use with extreme care!)'
kaf24@9654 184 @echo
keir@16275 185 @echo 'Trusted Boot (tboot) targets:'
keir@16275 186 @echo ' build-tboot - download and build the tboot module'
keir@16275 187 @echo ' install-tboot - download, build, and install the tboot module'
keir@16275 188 @echo ' clean-tboot - clean the tboot module if it exists'
keir@16275 189 @echo
kaf24@9654 190 @echo 'Environment:'
kaf24@9654 191 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
kaf24@9654 192 @echo ' - native python install or dist'
kaf24@9654 193 @echo ' install into prefix/lib/python<VERSION>'
kaf24@9654 194 @echo ' instead of <PREFIX>/lib/python'
kaf24@9654 195 @echo ' true if set to non-empty value, false otherwise'
mwilli2@3376 196
iap10@2835 197 # Use this target with extreme care!
kaf24@9660 198 .PHONY: uninstall
kaf24@3544 199 uninstall: D=$(DESTDIR)
iap10@1790 200 uninstall:
kaf24@7061 201 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
kaf24@3544 202 rm -rf $(D)/etc/init.d/xend*
kaf24@6972 203 rm -rf $(D)/etc/hotplug/xen-backend.agent
emellor@7797 204 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
emellor@7797 205 rm -f $(D)/etc/udev/xen-backend.rules
emellor@7797 206 rm -f $(D)/etc/sysconfig/xendomains
kaf24@5413 207 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
kaf24@3544 208 rm -rf $(D)/boot/*xen*
bren@3868 209 rm -rf $(D)/lib/modules/*xen*
kaf24@6973 210 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
kaf24@6308 211 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
kaf24@6308 212 rm -rf $(D)/usr/bin/xc_shadow
kaf24@8314 213 rm -rf $(D)/usr/bin/pygrub
kaf24@8314 214 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
kaf24@8314 215 rm -rf $(D)/usr/bin/xsls
kaf24@8314 216 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
kaf24@6972 217 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
kaf24@6972 218 rm -rf $(D)/usr/include/xen
keir@16841 219 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
keir@16841 220 rm -rf $(D)$(LIBDIR)/libxenstore*
keir@16841 221 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
keir@16841 222 rm -rf $(D)$(LIBDIR)/xen/
emellor@7797 223 rm -rf $(D)/usr/lib/xen/
kaf24@8314 224 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
kaf24@6972 225 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
kaf24@6972 226 rm -rf $(D)/usr/share/doc/xen
kaf24@6972 227 rm -rf $(D)/usr/share/xen
kaf24@6308 228 rm -rf $(D)/usr/share/man/man1/xen*
kaf24@6308 229 rm -rf $(D)/usr/share/man/man8/xen*
keir@16275 230 rm -rf $(D)/boot/tboot*
mwilli2@1914 231
kaf24@2978 232 # Legacy targets for compatibility
kaf24@9660 233 .PHONY: linux26
iap10@3514 234 linux26:
kaf24@5697 235 $(MAKE) 'KERNELS=linux-2.6*' kernels
keir@16275 236
keir@16275 237
keir@16275 238 #
keir@16275 239 # tboot targets
keir@16275 240 #
keir@16275 241
keir@17958 242 TBOOT_TARFILE = tboot-20080613.tar.gz
keir@16275 243 TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
keir@16275 244
keir@16275 245 .PHONY: build-tboot
keir@16275 246 build-tboot: download_tboot
keir@16275 247 $(MAKE) -C tboot build
keir@16275 248
keir@16275 249 .PHONY: install-tboot
keir@16275 250 install-tboot: download_tboot
keir@16275 251 $(MAKE) -C tboot install
keir@16275 252
keir@16512 253 .PHONY: dist-tboot
keir@16512 254 dist-tboot: download_tboot
keir@16512 255 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
keir@16512 256
keir@16275 257 .PHONY: clean-tboot
keir@16275 258 clean-tboot:
keir@16275 259 [ ! -d tboot ] || $(MAKE) -C tboot clean
keir@16275 260
keir@16275 261 .PHONY: distclean-tboot
keir@16275 262 distclean-tboot:
keir@16275 263 [ ! -d tboot ] || $(MAKE) -C tboot distclean
keir@16275 264
keir@16275 265 .PHONY: download_tboot
keir@16275 266 download_tboot: tboot/Makefile
keir@16275 267
keir@16275 268 tboot/Makefile: tboot/$(TBOOT_TARFILE)
keir@16275 269 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
keir@16275 270
keir@16275 271 tboot/$(TBOOT_TARFILE):
keir@16275 272 mkdir -p tboot
keir@16275 273 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)