ia64/xen-unstable

annotate Makefile @ 16806:edc95d23493b

xenctx/x86: fix format for readability and add information
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jan 18 15:27:02 2008 +0000 (2008-01-18)
parents 9ce9d43a76a2
children 6ed9b42d1ec4
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
kaf24@5769 16 ifeq ($(XEN_TARGET_X86_PAE),y)
kaf24@5769 17 export pae=y
kaf24@5769 18 endif
kaf24@5769 19
cl349@3561 20 # build and install everything into the standard system directories
kaf24@9660 21 .PHONY: install
shand@6575 22 install: install-xen install-kernels install-tools install-docs
iap10@3514 23
kaf24@9660 24 .PHONY: build
ian@13740 25 build: kernels
doogie@4109 26 $(MAKE) -C xen build
doogie@4109 27 $(MAKE) -C tools build
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
kaf24@7225 40 dist: dist-xen dist-kernels dist-tools 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)
iap10@3534 45 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
kaf24@7225 46 dist-%: DESTDIR=$(DISTDIR)/install
kaf24@7225 47 dist-%: install-%
kaf24@7225 48 @: # do nothing
cl349@2443 49
kaf24@7225 50 # Legacy dist targets
kaf24@9660 51 .PHONY: xen tools kernels docs
kaf24@7225 52 xen: dist-xen
kaf24@7225 53 tools: dist-tools
kaf24@7225 54 kernels: dist-kernels
kaf24@7225 55 docs: dist-docs
kaf24@7225 56
kaf24@9660 57 .PHONY: prep-kernels
vhanquez@8312 58 prep-kernels:
vhanquez@8312 59 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
vhanquez@8312 60
kaf24@9660 61 .PHONY: install-xen
ian@13740 62 install-xen:
kaf24@3537 63 $(MAKE) -C xen install
iap10@2842 64
kaf24@9660 65 .PHONY: install-tools
ian@13740 66 install-tools:
kaf24@3551 67 $(MAKE) -C tools install
iap10@2842 68
kaf24@9660 69 .PHONY: install-kernels
kaf24@7225 70 install-kernels:
kaf24@7313 71 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
cl349@2443 72
kaf24@9660 73 .PHONY: install-docs
kaf24@7225 74 install-docs:
kaf24@3537 75 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
iap10@2842 76
kaf24@9660 77 .PHONY: dev-docs
ewan@6783 78 dev-docs:
ewan@6783 79 $(MAKE) -C docs dev-docs
ewan@6783 80
kaf24@2978 81 # Build all the various kernels and modules
kaf24@9660 82 .PHONY: kbuild
cl349@2858 83 kbuild: kernels
cl349@2858 84
iap10@2842 85 # Delete the kernel build trees entirely
kaf24@9660 86 .PHONY: kdelete
iap10@3514 87 kdelete:
iap10@3514 88 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@2842 89
iap10@2842 90 # Clean the kernel build trees
kaf24@9660 91 .PHONY: kclean
iap10@3514 92 kclean:
iap10@3514 93 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
cl349@2443 94
iap10@1468 95 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
iap10@1468 96 # and place them in the install directory. 'make install' should then
iap10@1468 97 # copy them to the normal system directories
kaf24@9660 98 .PHONY: world
iap10@2842 99 world:
iap10@1558 100 $(MAKE) clean
iap10@2835 101 $(MAKE) kdelete
iap10@2845 102 $(MAKE) dist
iap10@1464 103
iap10@2842 104 # clean doesn't do a kclean
kaf24@9660 105 .PHONY: clean
keir@16275 106 clean::
iap10@3514 107 $(MAKE) -C xen clean
kaf24@3551 108 $(MAKE) -C tools clean
iap10@3514 109 $(MAKE) -C docs clean
kaf24@1446 110
kaf24@6906 111 # clean, but blow away kernel build tree plus tarballs
kaf24@9660 112 .PHONY: distclean
kaf24@10540 113 distclean:
kaf24@10540 114 $(MAKE) -C xen distclean
kaf24@10540 115 $(MAKE) -C tools distclean
kaf24@10540 116 $(MAKE) -C docs distclean
iap10@2900 117 rm -rf dist patches/tmp
iap10@3514 118 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
kaf24@10640 119 rm -rf patches/*/.makedep
iap10@1464 120
kaf24@6906 121 # Linux name for GNU distclean
kaf24@9660 122 .PHONY: mrproper
kaf24@6906 123 mrproper: distclean
kaf24@6906 124
kaf24@9660 125 .PHONY: help
mwilli2@3376 126 help:
mwilli2@3376 127 @echo 'Installation targets:'
kaf24@3537 128 @echo ' install - build and install everything'
cl349@3561 129 @echo ' install-xen - build and install the Xen hypervisor'
cl349@3561 130 @echo ' install-tools - build and install the control tools'
cl349@3561 131 @echo ' install-kernels - build and install guest kernels'
emellor@6792 132 @echo ' install-docs - build and install user documentation'
mwilli2@3376 133 @echo ''
mwilli2@3376 134 @echo 'Building targets:'
kaf24@3537 135 @echo ' dist - build and install everything into local dist directory'
mwilli2@3376 136 @echo ' world - clean everything, delete guest kernel build'
mwilli2@3376 137 @echo ' trees then make dist'
kaf24@3537 138 @echo ' xen - build and install Xen hypervisor'
kaf24@3537 139 @echo ' tools - build and install tools'
kaf24@3537 140 @echo ' kernels - build and install guest kernels'
mwilli2@3376 141 @echo ' kbuild - synonym for make kernels'
emellor@6792 142 @echo ' docs - build and install user documentation'
emellor@6792 143 @echo ' dev-docs - build developer-only documentation'
mwilli2@3376 144 @echo ''
mwilli2@3376 145 @echo 'Cleaning targets:'
kaf24@9653 146 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
kaf24@9653 147 @echo ' distclean - clean plus delete kernel build trees and'
kaf24@9653 148 @echo ' local downloaded files'
mwilli2@3376 149 @echo ' kdelete - delete guest kernel build trees'
mwilli2@3376 150 @echo ' kclean - clean guest kernel build trees'
mwilli2@3376 151 @echo ''
mwilli2@3376 152 @echo 'Miscellaneous targets:'
vhanquez@8312 153 @echo ' prep-kernels - prepares kernel directories, does not build'
kaf24@9653 154 @echo ' uninstall - attempt to remove installed Xen tools'
kaf24@9653 155 @echo ' (use with extreme care!)'
kaf24@9654 156 @echo
keir@16275 157 @echo 'Trusted Boot (tboot) targets:'
keir@16275 158 @echo ' build-tboot - download and build the tboot module'
keir@16275 159 @echo ' install-tboot - download, build, and install the tboot module'
keir@16275 160 @echo ' clean-tboot - clean the tboot module if it exists'
keir@16275 161 @echo
kaf24@9654 162 @echo 'Environment:'
kaf24@9654 163 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
kaf24@9654 164 @echo ' - native python install or dist'
kaf24@9654 165 @echo ' install into prefix/lib/python<VERSION>'
kaf24@9654 166 @echo ' instead of <PREFIX>/lib/python'
kaf24@9654 167 @echo ' true if set to non-empty value, false otherwise'
mwilli2@3376 168
iap10@2835 169 # Use this target with extreme care!
kaf24@9660 170 .PHONY: uninstall
kaf24@3544 171 uninstall: D=$(DESTDIR)
iap10@1790 172 uninstall:
kaf24@7061 173 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
kaf24@3544 174 rm -rf $(D)/etc/init.d/xend*
kaf24@6972 175 rm -rf $(D)/etc/hotplug/xen-backend.agent
emellor@7797 176 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
emellor@7797 177 rm -f $(D)/etc/udev/xen-backend.rules
emellor@7797 178 rm -f $(D)/etc/sysconfig/xendomains
kaf24@5413 179 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
kaf24@3544 180 rm -rf $(D)/boot/*xen*
bren@3868 181 rm -rf $(D)/lib/modules/*xen*
kaf24@6973 182 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
kaf24@6308 183 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
kaf24@6308 184 rm -rf $(D)/usr/bin/xc_shadow
kaf24@8314 185 rm -rf $(D)/usr/bin/pygrub
kaf24@8314 186 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
kaf24@8314 187 rm -rf $(D)/usr/bin/xsls
kaf24@8314 188 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
kaf24@6972 189 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
kaf24@6972 190 rm -rf $(D)/usr/include/xen
kaf24@6972 191 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
kaf24@6972 192 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
kaf24@8314 193 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/python/grub
emellor@7797 194 rm -rf $(D)/usr/$(LIBDIR)/xen/
emellor@7797 195 rm -rf $(D)/usr/lib/xen/
kaf24@8314 196 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
kaf24@6972 197 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
kaf24@6972 198 rm -rf $(D)/usr/share/doc/xen
kaf24@6972 199 rm -rf $(D)/usr/share/xen
kaf24@6308 200 rm -rf $(D)/usr/share/man/man1/xen*
kaf24@6308 201 rm -rf $(D)/usr/share/man/man8/xen*
keir@16275 202 rm -rf $(D)/boot/tboot*
mwilli2@1914 203
kaf24@2978 204 # Legacy targets for compatibility
kaf24@9660 205 .PHONY: linux26
iap10@3514 206 linux26:
kaf24@5697 207 $(MAKE) 'KERNELS=linux-2.6*' kernels
keir@16275 208
keir@16275 209
keir@16275 210 #
keir@16275 211 # tboot targets
keir@16275 212 #
keir@16275 213
keir@16512 214 TBOOT_TARFILE = tboot-20071128.tar.gz
keir@16275 215 TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
keir@16275 216
keir@16275 217 .PHONY: build-tboot
keir@16275 218 build-tboot: download_tboot
keir@16275 219 $(MAKE) -C tboot build
keir@16275 220
keir@16275 221 .PHONY: install-tboot
keir@16275 222 install-tboot: download_tboot
keir@16275 223 $(MAKE) -C tboot install
keir@16275 224
keir@16512 225 .PHONY: dist-tboot
keir@16512 226 dist-tboot: download_tboot
keir@16512 227 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
keir@16512 228
keir@16275 229 .PHONY: clean-tboot
keir@16275 230 clean-tboot:
keir@16275 231 [ ! -d tboot ] || $(MAKE) -C tboot clean
keir@16275 232
keir@16275 233 .PHONY: distclean-tboot
keir@16275 234 distclean-tboot:
keir@16275 235 [ ! -d tboot ] || $(MAKE) -C tboot distclean
keir@16275 236
keir@16275 237 .PHONY: download_tboot
keir@16275 238 download_tboot: tboot/Makefile
keir@16275 239
keir@16275 240 tboot/Makefile: tboot/$(TBOOT_TARFILE)
keir@16275 241 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
keir@16275 242
keir@16275 243 tboot/$(TBOOT_TARFILE):
keir@16275 244 mkdir -p tboot
keir@16275 245 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)