xen-vtx-unstable

annotate Makefile @ 6774:4d899a738d59

merge?
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 15:05:49 2005 +0000 (2005-09-13)
parents f752e0c873a6 98c5c6a1e857
children e7c7196fa329 8ca0f98ba8e2
rev   line source
kaf24@1446 1 #
kaf24@424 2 # Grand Unified Makefile for Xen.
kaf24@424 3 #
kaf24@424 4
kaf24@3541 5 # Default is to install to local 'dist' directory.
kaf24@3541 6 DISTDIR ?= $(CURDIR)/dist
kaf24@3541 7 DESTDIR ?= $(DISTDIR)/install
kaf24@3541 8
iap10@3491 9 INSTALL := install
iap10@3491 10 INSTALL_DIR := $(INSTALL) -d -m0755
iap10@3491 11 INSTALL_DATA := $(INSTALL) -m0644
iap10@3491 12 INSTALL_PROG := $(INSTALL) -m0755
iap10@1464 13
cl349@3561 14 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
kaf24@2978 15 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
iap10@3132 16 # You may use wildcards in the above e.g. KERNELS=*2.4*
iap10@1558 17
iap10@3132 18 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
iap10@3132 19
iap10@3499 20 export DESTDIR
kaf24@2978 21
kaf24@3549 22 # Export target architecture overrides to Xen and Linux sub-trees.
kaf24@3951 23 ifneq ($(XEN_TARGET_ARCH),)
kaf24@3951 24 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
kaf24@3951 25 export XEN_TARGET_ARCH SUBARCH
kaf24@3549 26 endif
kaf24@3549 27
kaf24@5199 28 # Default target must appear before any include lines
kaf24@5199 29 all: dist
kaf24@5199 30
kaf24@4252 31 include Config.mk
kaf24@2978 32 include buildconfigs/Rules.mk
iap10@2835 33
kaf24@5769 34 ifeq ($(XEN_TARGET_X86_PAE),y)
kaf24@5769 35 export pae=y
kaf24@5769 36 endif
kaf24@5769 37
ewan@6763 38 .PHONY: all dist install xen kernels tools dev-docs docs world clean
ewan@6763 39 .PHONY: mkpatches mrproper kbuild kdelete kclean
iap10@2835 40
cl349@3561 41 # build and install everything into the standard system directories
shand@6557 42 install: install-xen install-kernels install-tools install-docs
iap10@3514 43
doogie@4109 44 build: kernels
doogie@4109 45 $(MAKE) -C xen build
doogie@4109 46 $(MAKE) -C tools build
doogie@4109 47 $(MAKE) -C docs build
doogie@4109 48
iap10@2836 49 # build and install everything into local dist directory
shand@6557 50 dist: xen kernels tools docs
iap10@3534 51 $(INSTALL_DIR) $(DISTDIR)/check
iap10@3534 52 $(INSTALL_DATA) ./COPYING $(DISTDIR)
iap10@3534 53 $(INSTALL_DATA) ./README $(DISTDIR)
iap10@3534 54 $(INSTALL_PROG) ./install.sh $(DISTDIR)
iap10@3534 55 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
iap10@1527 56
iap10@2842 57 xen:
kaf24@3537 58 $(MAKE) -C xen install
iap10@2842 59
iap10@2842 60 tools:
kaf24@3551 61 $(MAKE) -C tools install
iap10@2842 62
iap10@3514 63 kernels:
iap10@3526 64 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
cl349@2443 65
iap10@2842 66 docs:
kaf24@3537 67 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
iap10@2842 68
ewan@6763 69 dev-docs:
ewan@6763 70 $(MAKE) -C docs dev-docs
ewan@6763 71
kaf24@2978 72 # Build all the various kernels and modules
cl349@2858 73 kbuild: kernels
cl349@2858 74
iap10@2842 75 # Delete the kernel build trees entirely
iap10@3514 76 kdelete:
iap10@3514 77 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@2842 78
iap10@2842 79 # Clean the kernel build trees
iap10@3514 80 kclean:
iap10@3514 81 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
cl349@2443 82
iap10@2835 83 # Make patches from kernel sparse trees
iap10@3514 84 mkpatches:
kaf24@4649 85 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
cl349@2443 86
iap10@1468 87 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
iap10@1468 88 # and place them in the install directory. 'make install' should then
iap10@1468 89 # copy them to the normal system directories
iap10@2842 90 world:
iap10@1558 91 $(MAKE) clean
iap10@2835 92 $(MAKE) kdelete
iap10@2845 93 $(MAKE) dist
iap10@1464 94
iap10@2842 95 # clean doesn't do a kclean
cl349@4889 96 clean::
iap10@3514 97 $(MAKE) -C xen clean
kaf24@3551 98 $(MAKE) -C tools clean
iap10@3514 99 $(MAKE) -C docs clean
kaf24@1446 100
iap10@2835 101 # clean, but blow away kernel build tree plus tar balls
iap10@3514 102 mrproper: clean
iap10@2900 103 rm -rf dist patches/tmp
iap10@3514 104 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
iap10@3514 105 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
iap10@1464 106
mjw@1843 107 install-logging: LOGGING=logging-0.4.9.2
mjw@1843 108 install-logging:
mjw@1843 109 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
iap10@2040 110 tar -zxf $(LOGGING).tar.gz
iap10@3500 111 cd $(LOGGING) && python setup.py install
mjw@1843 112
iap10@1558 113 # handy target to upgrade iptables (use rpm or apt-get in preference)
iap10@1558 114 install-iptables:
iap10@1558 115 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
iap10@3500 116 tar -jxf iptables-1.2.11.tar.bz2
iap10@3500 117 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
iap10@1558 118
cl349@3561 119 install-%: DESTDIR=
cl349@3561 120 install-%: %
cl349@3561 121 @: # do nothing
cl349@3561 122
mwilli2@3376 123 help:
mwilli2@3376 124 @echo 'Installation targets:'
kaf24@3537 125 @echo ' install - build and install everything'
cl349@3561 126 @echo ' install-xen - build and install the Xen hypervisor'
cl349@3561 127 @echo ' install-tools - build and install the control tools'
cl349@3561 128 @echo ' install-kernels - build and install guest kernels'
emellor@6772 129 @echo ' install-docs - build and install user documentation'
mwilli2@3376 130 @echo ''
mwilli2@3376 131 @echo 'Building targets:'
kaf24@3537 132 @echo ' dist - build and install everything into local dist directory'
mwilli2@3376 133 @echo ' world - clean everything, delete guest kernel build'
mwilli2@3376 134 @echo ' trees then make dist'
kaf24@3537 135 @echo ' xen - build and install Xen hypervisor'
kaf24@3537 136 @echo ' tools - build and install tools'
kaf24@3537 137 @echo ' kernels - build and install guest kernels'
mwilli2@3376 138 @echo ' kbuild - synonym for make kernels'
emellor@6772 139 @echo ' docs - build and install user documentation'
emellor@6772 140 @echo ' dev-docs - build developer-only documentation'
mwilli2@3376 141 @echo ''
mwilli2@3376 142 @echo 'Cleaning targets:'
mwilli2@3376 143 @echo ' clean - clean the Xen, tools and docs (but not'
mwilli2@3376 144 @echo ' guest kernel) trees'
mwilli2@3376 145 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
mwilli2@3376 146 @echo ' build trees'
mwilli2@3376 147 @echo ' kdelete - delete guest kernel build trees'
mwilli2@3376 148 @echo ' kclean - clean guest kernel build trees'
mwilli2@3376 149 @echo ''
mwilli2@3376 150 @echo 'Dependency installation targets:'
mwilli2@3376 151 @echo ' install-logging - install the Python Logging package'
mwilli2@3376 152 @echo ' install-iptables - install iptables tools'
mwilli2@3376 153 @echo ''
mwilli2@3376 154 @echo 'Miscellaneous targets:'
mwilli2@3376 155 @echo ' mkpatches - make patches against vanilla kernels from'
mwilli2@3376 156 @echo ' sparse trees'
mwilli2@3376 157 @echo ' uninstall - attempt to remove installed Xen tools (use'
mwilli2@3376 158 @echo ' with extreme care!)'
mwilli2@3376 159
iap10@2835 160 # Use this target with extreme care!
kaf24@3544 161 uninstall: DESTDIR=
kaf24@3544 162 uninstall: D=$(DESTDIR)
iap10@1790 163 uninstall:
kaf24@5810 164 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s`
kaf24@3544 165 rm -rf $(D)/etc/init.d/xend*
katzj@4544 166 rm -rf $(D)/usr/$(LIBDIR)/libxc* $(D)/usr/$(LIBDIR)/libxutil*
arun@5134 167 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/include/xen
kaf24@5413 168 rm -rf $(D)/usr/$(LIBDIR)/share/xen $(D)/usr/$(LIBDIR)/libxenstore*
kaf24@5413 169 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
kaf24@3544 170 rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
kaf24@5418 171 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
kaf24@3544 172 rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
kaf24@3544 173 rm -rf $(D)/usr/sbin/netfix
kaf24@5413 174 rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm
kaf24@3544 175 rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace*
kaf24@3544 176 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm
kaf24@3544 177 rm -rf $(D)/boot/*xen*
bren@3868 178 rm -rf $(D)/lib/modules/*xen*
kaf24@6293 179 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
kaf24@6293 180 rm -rf $(D)/usr/bin/xc_shadow
kaf24@6293 181 rm -rf $(D)/usr/share/xen $(D)/usr/libexec/xen
kaf24@6293 182 rm -rf $(D)/usr/share/man/man1/xen*
kaf24@6293 183 rm -rf $(D)/usr/share/man/man8/xen*
kaf24@6293 184 rm -rf $(D)/usr/lib/xen
cl349@6572 185 rm -rf $(D)/etc/hotplug.d/xen-backend
cl349@6572 186 rm -rf $(D)/etc/hotplug/xen-backend.agent
mwilli2@1914 187
kaf24@2978 188 # Legacy targets for compatibility
iap10@3514 189 linux24:
kaf24@5697 190 $(MAKE) 'KERNELS=linux-2.4*' kernels
iap10@2835 191
iap10@3514 192 linux26:
kaf24@5697 193 $(MAKE) 'KERNELS=linux-2.6*' kernels
iap10@2835 194
iap10@3514 195 netbsd20:
iap10@3514 196 $(MAKE) netbsd-2.0-xenU-build
cl349@3561 197