ia64/xen-unstable

view Makefile @ 3471:ed0d4ce83995

bitkeeper revision 1.1159.223.8 (41f04ee28OyElXpjo4VeyXy925falg)

Upgrade to linux 2.4.29
author iap10@labyrinth.cl.cam.ac.uk
date Fri Jan 21 00:37:54 2005 +0000 (2005-01-21)
parents 8c149b512126
children 6aadc1c26a93 77ecf0226c2c 0dc3b8b8c298
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 DIST_DIR ?= $(shell pwd)/dist
6 INSTALL_DIR ?= $(DIST_DIR)/install
8 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
9 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
10 # You may use wildcards in the above e.g. KERNELS=*2.4*
12 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
13 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
14 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
17 export INSTALL_DIR
19 include buildconfigs/Rules.mk
21 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
22 .PHONY: kbuild kdelete kclean install-tools install-xen install-docs
23 .PHONY: install-kernels
25 all: dist
27 # install everything into the standard system directories
28 # NB: install explicitly does not check that everything is up to date!
29 install: install-tools install-xen install-kernels install-docs
31 install-xen:
32 $(MAKE) -C xen install
34 install-tools:
35 $(MAKE) -C tools install
37 install-kernels:
38 $(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
39 $(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
40 $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
41 $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
43 install-docs:
44 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
46 # build and install everything into local dist directory
47 dist: xen tools kernels docs
48 install -m0644 ./COPYING $(DIST_DIR)
49 install -m0644 ./README $(DIST_DIR)
50 install -m0755 ./install.sh $(DIST_DIR)
51 mkdir -p $(DIST_DIR)/check
52 install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
54 xen:
55 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
57 tools:
58 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
60 kernels:
61 for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done
63 docs:
64 sh ./docs/check_pkgs && \
65 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
67 # Build all the various kernels and modules
68 kbuild: kernels
70 # Delete the kernel build trees entirely
71 kdelete:
72 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
74 # Clean the kernel build trees
75 kclean:
76 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
78 # Make patches from kernel sparse trees
79 mkpatches:
80 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
83 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
84 # and place them in the install directory. 'make install' should then
85 # copy them to the normal system directories
86 world:
87 $(MAKE) clean
88 $(MAKE) kdelete
89 $(MAKE) dist
91 # clean doesn't do a kclean
92 clean:
93 $(MAKE) -C xen clean
94 $(MAKE) -C tools clean
95 $(MAKE) -C docs clean
97 # clean, but blow away kernel build tree plus tar balls
98 mrproper: clean
99 rm -rf dist patches/tmp
100 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
101 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
103 install-twisted:
104 wget http://www.twistedmatrix.com/products/get-current.epy
105 tar -zxf Twisted-*.tar.gz
106 ( cd Twisted-* ; python setup.py install )
108 install-logging: LOGGING=logging-0.4.9.2
109 install-logging:
110 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
111 tar -zxf $(LOGGING).tar.gz
112 ( cd $(LOGGING) && python setup.py install )
114 # handy target to upgrade iptables (use rpm or apt-get in preference)
115 install-iptables:
116 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
117 tar -jxf iptables-*.tar.bz2
118 ( cd iptables-* ; \
119 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
121 help:
122 @echo 'Installation targets:'
123 @echo ' install - install everything'
124 @echo ' install-xen - install the Xen hypervisor'
125 @echo ' install-tools - install the control tools'
126 @echo ' install-kernels - install guest kernels'
127 @echo ' install-docs - install documentation'
128 @echo ''
129 @echo 'Building targets:'
130 @echo ' dist - build everything and place in dist/'
131 @echo ' world - clean everything, delete guest kernel build'
132 @echo ' trees then make dist'
133 @echo ' xen - build Xen hypervisor and place in dist/'
134 @echo ' tools - build tools and place in dist/'
135 @echo ' kernels - build guest kernels and place in dist/'
136 @echo ' kbuild - synonym for make kernels'
137 @echo ' docs - build docs and place in dist/'
138 @echo ''
139 @echo 'Cleaning targets:'
140 @echo ' clean - clean the Xen, tools and docs (but not'
141 @echo ' guest kernel) trees'
142 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
143 @echo ' build trees'
144 @echo ' kdelete - delete guest kernel build trees'
145 @echo ' kclean - clean guest kernel build trees'
146 @echo ''
147 @echo 'Dependency installation targets:'
148 @echo ' install-twisted - install the Twisted Matrix Framework'
149 @echo ' install-logging - install the Python Logging package'
150 @echo ' install-iptables - install iptables tools'
151 @echo ''
152 @echo 'Miscellaneous targets:'
153 @echo ' mkpatches - make patches against vanilla kernels from'
154 @echo ' sparse trees'
155 @echo ' uninstall - attempt to remove installed Xen tools (use'
156 @echo ' with extreme care!)'
158 # Use this target with extreme care!
159 uninstall:
160 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
161 rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
163 # Legacy targets for compatibility
164 linux24:
165 $(MAKE) linux-2.4-xen0-build
166 $(MAKE) linux-2.4-xenU-build
168 linux26:
169 $(MAKE) linux-2.6-xen0-build
170 $(MAKE) linux-2.6-xenU-build
172 netbsd20:
173 $(MAKE) netbsd-2.0-xenU-build