debuggers.hg

annotate Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 2bedffabbcab
children
rev   line source
kaf24@1484 1 #
kaf24@462 2 # Grand Unified Makefile for Xen.
kaf24@462 3 #
kaf24@462 4
kaf24@5237 5 # Default target must appear before any include lines
kaf24@9645 6 .PHONY: all
kaf24@5237 7 all: dist
kaf24@5237 8
kfraser@10238 9 export XEN_ROOT=$(CURDIR)
kaf24@4290 10 include Config.mk
kfraser@13439 11
kfraser@13439 12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
kfraser@13439 13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
kaf24@3016 14 include buildconfigs/Rules.mk
iap10@2873 15
cl349@3599 16 # build and install everything into the standard system directories
kaf24@9645 17 .PHONY: install
keir@18090 18 install: install-xen install-kernels install-tools install-stubdom install-docs
iap10@3552 19
kaf24@9645 20 .PHONY: build
ian@13752 21 build: kernels
doogie@4147 22 $(MAKE) -C xen build
doogie@4147 23 $(MAKE) -C tools build
keir@18049 24 $(MAKE) -C stubdom build
keir@18368 25 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18368 26 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
keir@18368 27 endif
doogie@4147 28 $(MAKE) -C docs build
doogie@4147 29
emellor@7273 30 # The test target is for unit tests that can run without an installation. Of
emellor@7273 31 # course, many tests require a machine running Xen itself, and these are
emellor@7273 32 # handled elsewhere.
kaf24@9645 33 .PHONY: test
emellor@7273 34 test:
emellor@7273 35 $(MAKE) -C tools/python test
emellor@7273 36
iap10@2874 37 # build and install everything into local dist directory
kaf24@9645 38 .PHONY: dist
kaf24@7254 39 dist: DESTDIR=$(DISTDIR)/install
keir@21680 40 dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs dist-misc
keir@21680 41
keir@21680 42 dist-misc:
iap10@3572 43 $(INSTALL_DIR) $(DISTDIR)/check
iap10@3572 44 $(INSTALL_DATA) ./COPYING $(DISTDIR)
iap10@3572 45 $(INSTALL_DATA) ./README $(DISTDIR)
iap10@3572 46 $(INSTALL_PROG) ./install.sh $(DISTDIR)
keir@16930 47 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
kaf24@7254 48 dist-%: DESTDIR=$(DISTDIR)/install
kaf24@7254 49 dist-%: install-%
kaf24@7254 50 @: # do nothing
iap10@1565 51
kaf24@7254 52 # Legacy dist targets
keir@18049 53 .PHONY: xen tools stubdom kernels docs
kaf24@7254 54 xen: dist-xen
kaf24@7254 55 tools: dist-tools
kaf24@7254 56 kernels: dist-kernels
keir@18049 57 stubdom: dist-stubdom
kaf24@7254 58 docs: dist-docs
kaf24@7254 59
kaf24@9645 60 .PHONY: prep-kernels
vhanquez@8350 61 prep-kernels:
vhanquez@8350 62 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
vhanquez@8350 63
kaf24@9645 64 .PHONY: install-xen
ian@13752 65 install-xen:
kaf24@3575 66 $(MAKE) -C xen install
iap10@2880 67
kaf24@9645 68 .PHONY: install-tools
keir@18520 69 install-tools: tools/ioemu-dir
kaf24@3589 70 $(MAKE) -C tools install
iap10@2880 71
kaf24@9645 72 .PHONY: install-kernels
kaf24@7254 73 install-kernels:
kaf24@7336 74 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
cl349@2481 75
keir@18049 76 .PHONY: install-stubdom
keir@21806 77 install-stubdom: tools/ioemu-dir install-tools
keir@18049 78 $(MAKE) -C stubdom install
keir@18368 79 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18368 80 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
keir@18368 81 endif
keir@18049 82
keir@18520 83 tools/ioemu-dir:
keir@18578 84 $(MAKE) -C tools ioemu-dir-find
keir@18520 85
ian@22427 86 .PHONY: tools/ioemu-dir-force-update
ian@22427 87 tools/ioemu-dir-force-update:
ian@22427 88 $(MAKE) -C tools ioemu-dir-force-update
ian@22427 89
kaf24@9645 90 .PHONY: install-docs
kaf24@7254 91 install-docs:
kaf24@3575 92 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
iap10@2880 93
kaf24@9645 94 .PHONY: dev-docs
ewan@6801 95 dev-docs:
ewan@6801 96 $(MAKE) -C docs dev-docs
ewan@6801 97
kaf24@3016 98 # Build all the various kernels and modules
kaf24@9645 99 .PHONY: kbuild
cl349@2896 100 kbuild: kernels
cl349@2896 101
iap10@2880 102 # Delete the kernel build trees entirely
kaf24@9645 103 .PHONY: kdelete
iap10@3552 104 kdelete:
iap10@3552 105 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@2880 106
iap10@2880 107 # Clean the kernel build trees
kaf24@9645 108 .PHONY: kclean
iap10@3552 109 kclean:
iap10@3552 110 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
cl349@2481 111
iap10@1506 112 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
iap10@1506 113 # and place them in the install directory. 'make install' should then
iap10@1506 114 # copy them to the normal system directories
kaf24@9645 115 .PHONY: world
iap10@2880 116 world:
iap10@1596 117 $(MAKE) clean
iap10@2873 118 $(MAKE) kdelete
iap10@2883 119 $(MAKE) dist
iap10@1502 120
iap10@2880 121 # clean doesn't do a kclean
kaf24@9645 122 .PHONY: clean
keir@16305 123 clean::
iap10@3552 124 $(MAKE) -C xen clean
kaf24@3589 125 $(MAKE) -C tools clean
keir@18049 126 $(MAKE) -C stubdom crossclean
keir@18368 127 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18368 128 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
keir@18368 129 endif
iap10@3552 130 $(MAKE) -C docs clean
kaf24@1484 131
kaf24@6922 132 # clean, but blow away kernel build tree plus tarballs
kaf24@9645 133 .PHONY: distclean
kaf24@10538 134 distclean:
kaf24@10538 135 $(MAKE) -C xen distclean
kaf24@10538 136 $(MAKE) -C tools distclean
keir@18049 137 $(MAKE) -C stubdom distclean
keir@18368 138 ifeq (x86_64,$(XEN_TARGET_ARCH))
keir@18368 139 XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
keir@18368 140 endif
kaf24@10538 141 $(MAKE) -C docs distclean
iap10@2938 142 rm -rf dist patches/tmp
iap10@3552 143 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
kaf24@10664 144 rm -rf patches/*/.makedep
iap10@1502 145
kaf24@6922 146 # Linux name for GNU distclean
kaf24@9645 147 .PHONY: mrproper
kaf24@6922 148 mrproper: distclean
kaf24@6922 149
keir@17526 150 # Prepare for source tarball
keir@17526 151 .PHONY: src-tarball
keir@17526 152 src-tarball: distclean
keir@17526 153 $(MAKE) -C xen .banner
keir@17527 154 rm -rf xen/tools/figlet .[a-z]*
keir@17526 155 $(MAKE) -C xen distclean
keir@17526 156
kaf24@9645 157 .PHONY: help
mwilli2@3414 158 help:
mwilli2@3414 159 @echo 'Installation targets:'
kaf24@3575 160 @echo ' install - build and install everything'
cl349@3599 161 @echo ' install-xen - build and install the Xen hypervisor'
cl349@3599 162 @echo ' install-tools - build and install the control tools'
cl349@3599 163 @echo ' install-kernels - build and install guest kernels'
keir@18049 164 @echo ' install-stubdom - build and install the stubdomain images'
emellor@6810 165 @echo ' install-docs - build and install user documentation'
mwilli2@3414 166 @echo ''
mwilli2@3414 167 @echo 'Building targets:'
kaf24@3575 168 @echo ' dist - build and install everything into local dist directory'
mwilli2@3414 169 @echo ' world - clean everything, delete guest kernel build'
mwilli2@3414 170 @echo ' trees then make dist'
kaf24@3575 171 @echo ' xen - build and install Xen hypervisor'
kaf24@3575 172 @echo ' tools - build and install tools'
keir@18262 173 @echo ' stubdom - build and install the stubdomain images'
kaf24@3575 174 @echo ' kernels - build and install guest kernels'
mwilli2@3414 175 @echo ' kbuild - synonym for make kernels'
emellor@6810 176 @echo ' docs - build and install user documentation'
emellor@6810 177 @echo ' dev-docs - build developer-only documentation'
mwilli2@3414 178 @echo ''
mwilli2@3414 179 @echo 'Cleaning targets:'
kaf24@9638 180 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
kaf24@9638 181 @echo ' distclean - clean plus delete kernel build trees and'
kaf24@9638 182 @echo ' local downloaded files'
mwilli2@3414 183 @echo ' kdelete - delete guest kernel build trees'
mwilli2@3414 184 @echo ' kclean - clean guest kernel build trees'
mwilli2@3414 185 @echo ''
mwilli2@3414 186 @echo 'Miscellaneous targets:'
vhanquez@8350 187 @echo ' prep-kernels - prepares kernel directories, does not build'
kaf24@9638 188 @echo ' uninstall - attempt to remove installed Xen tools'
kaf24@9638 189 @echo ' (use with extreme care!)'
kaf24@9639 190 @echo
keir@16305 191 @echo 'Trusted Boot (tboot) targets:'
keir@16305 192 @echo ' build-tboot - download and build the tboot module'
keir@16305 193 @echo ' install-tboot - download, build, and install the tboot module'
keir@16305 194 @echo ' clean-tboot - clean the tboot module if it exists'
keir@16305 195 @echo
kaf24@9639 196 @echo 'Environment:'
keir@19562 197 @echo ' [ this documentation is sadly not complete ]'
mwilli2@3414 198
iap10@2873 199 # Use this target with extreme care!
kaf24@9645 200 .PHONY: uninstall
kaf24@3582 201 uninstall: D=$(DESTDIR)
iap10@1828 202 uninstall:
keir@19683 203 [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) $(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
keir@19683 204 rm -rf $(D)$(CONFIG_DIR)/init.d/xend*
keir@19683 205 rm -rf $(D)$(CONFIG_DIR)/hotplug/xen-backend.agent
keir@19683 206 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xen-backend.rules
keir@19683 207 rm -f $(D)$(CONFIG_DIR)/udev/xen-backend.rules
keir@19683 208 rm -f $(D)$(CONFIG_DIR)/udev/rules.d/xend.rules
keir@19683 209 rm -f $(D)$(CONFIG_DIR)/udev/xend.rules
bruce@22225 210 rm -f $(D)$(SYSCONFIG_DIR)/xendomains
kaf24@5451 211 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
kaf24@3582 212 rm -rf $(D)/boot/*xen*
bren@3906 213 rm -rf $(D)/lib/modules/*xen*
keir@19683 214 rm -rf $(D)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount
keir@19683 215 rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
keir@19683 216 rm -rf $(D)$(BINDIR)/xc_shadow
keir@19683 217 rm -rf $(D)$(BINDIR)/pygrub
keir@19683 218 rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl
keir@19683 219 rm -rf $(D)$(BINDIR)/xsls
keir@19683 220 rm -rf $(D)$(INCLUDEDIR)/xenctrl.h $(D)$(INCLUDEDIR)/xenguest.h
keir@19683 221 rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
keir@19683 222 rm -rf $(D)$(INCLUDEDIR)/xen
keir@16824 223 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
keir@16824 224 rm -rf $(D)$(LIBDIR)/libxenstore*
keir@16824 225 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
keir@16824 226 rm -rf $(D)$(LIBDIR)/xen/
keir@19683 227 rm -rf $(D)$(LIBEXEC)/xen*
keir@19683 228 rm -rf $(D)$(SBINDIR)/setmask
keir@19683 229 rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm
keir@19683 230 rm -rf $(D)$(SHAREDIR)/doc/xen
keir@19683 231 rm -rf $(D)$(SHAREDIR)/xen
keir@19683 232 rm -rf $(D)$(MAN1DIR)/xen*
keir@19683 233 rm -rf $(D)$(MAN8DIR)/xen*
keir@16305 234 rm -rf $(D)/boot/tboot*
mwilli2@1952 235
kaf24@3016 236 # Legacy targets for compatibility
kaf24@9645 237 .PHONY: linux26
iap10@3552 238 linux26:
kaf24@5735 239 $(MAKE) 'KERNELS=linux-2.6*' kernels
keir@16305 240
keir@16305 241
keir@16305 242 #
keir@16305 243 # tboot targets
keir@16305 244 #
keir@16305 245
keir@19596 246 TBOOT_TARFILE = tboot-20090330.tar.gz
keir@19007 247 #TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
keir@19007 248 TBOOT_BASE_URL = $(XEN_EXTFILES_URL)
keir@16305 249
keir@16305 250 .PHONY: build-tboot
keir@16305 251 build-tboot: download_tboot
keir@16305 252 $(MAKE) -C tboot build
keir@16305 253
keir@16305 254 .PHONY: install-tboot
keir@16305 255 install-tboot: download_tboot
keir@16305 256 $(MAKE) -C tboot install
keir@16305 257
keir@16540 258 .PHONY: dist-tboot
keir@16540 259 dist-tboot: download_tboot
keir@16540 260 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
keir@16540 261
keir@16305 262 .PHONY: clean-tboot
keir@16305 263 clean-tboot:
keir@16305 264 [ ! -d tboot ] || $(MAKE) -C tboot clean
keir@16305 265
keir@16305 266 .PHONY: distclean-tboot
keir@16305 267 distclean-tboot:
keir@16305 268 [ ! -d tboot ] || $(MAKE) -C tboot distclean
keir@16305 269
keir@16305 270 .PHONY: download_tboot
keir@16305 271 download_tboot: tboot/Makefile
keir@16305 272
keir@16305 273 tboot/Makefile: tboot/$(TBOOT_TARFILE)
keir@16305 274 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
keir@16305 275
keir@16305 276 tboot/$(TBOOT_TARFILE):
keir@16305 277 mkdir -p tboot
keir@16305 278 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)