ia64/xen-unstable
view Makefile @ 4895:24dfd18ea63e
bitkeeper revision 1.1159.258.120 (42848bfe8kMyWWcBA64rq7h7l7AyoA)
Shadow code bug fix (found by Ian) that was breaking refcounts, and subsequently
causing migration problems.
Shadow code bug fix (found by Ian) that was breaking refcounts, and subsequently
causing migration problems.
author | mafetter@fleming.research |
---|---|
date | Fri May 13 11:14:06 2005 +0000 (2005-05-13) |
parents | 783e437809b6 |
children | 1c0f716646d1 e612db3c36db |
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 # Default is to install to local 'dist' directory.
6 DISTDIR ?= $(CURDIR)/dist
7 DESTDIR ?= $(DISTDIR)/install
9 INSTALL := install
10 INSTALL_DIR := $(INSTALL) -d -m0755
11 INSTALL_DATA := $(INSTALL) -m0644
12 INSTALL_PROG := $(INSTALL) -m0755
14 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
15 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
16 # You may use wildcards in the above e.g. KERNELS=*2.4*
18 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
20 export DESTDIR
22 # Export target architecture overrides to Xen and Linux sub-trees.
23 ifneq ($(TARGET_ARCH),)
24 SUBARCH := $(subst x86_32,i386,$(TARGET_ARCH))
25 export TARGET_ARCH SUBARCH
26 endif
28 include buildconfigs/Rules.mk
30 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
31 .PHONY: kbuild kdelete kclean
33 all: dist
35 # build and install everything into the standard system directories
36 install: install-xen install-tools install-kernels install-docs
38 build: kernels
39 $(MAKE) -C xen build
40 $(MAKE) -C tools build
41 $(MAKE) -C docs build
43 # build and install everything into local dist directory
44 dist: xen tools kernels docs
45 $(INSTALL_DIR) $(DISTDIR)/check
46 $(INSTALL_DATA) ./COPYING $(DISTDIR)
47 $(INSTALL_DATA) ./README $(DISTDIR)
48 $(INSTALL_PROG) ./install.sh $(DISTDIR)
49 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
51 xen:
52 $(MAKE) -C xen install
54 tools:
55 $(MAKE) -C tools install
57 kernels:
58 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
60 docs:
61 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
63 # Build all the various kernels and modules
64 kbuild: kernels
66 # Delete the kernel build trees entirely
67 kdelete:
68 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
70 # Clean the kernel build trees
71 kclean:
72 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
74 # Make patches from kernel sparse trees
75 mkpatches:
76 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
78 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
79 # and place them in the install directory. 'make install' should then
80 # copy them to the normal system directories
81 world:
82 $(MAKE) clean
83 $(MAKE) kdelete
84 $(MAKE) dist
86 # clean doesn't do a kclean
87 clean::
88 $(MAKE) -C xen clean
89 $(MAKE) -C tools clean
90 $(MAKE) -C docs clean
92 # clean, but blow away kernel build tree plus tar balls
93 mrproper: clean
94 rm -rf dist patches/tmp
95 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
96 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
98 install-twisted:
99 wget http://www.twistedmatrix.com/products/get-current.epy
100 tar -zxf Twisted-*.tar.gz
101 cd Twisted-* && python setup.py install
103 install-logging: LOGGING=logging-0.4.9.2
104 install-logging:
105 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
106 tar -zxf $(LOGGING).tar.gz
107 cd $(LOGGING) && python setup.py install
109 # handy target to upgrade iptables (use rpm or apt-get in preference)
110 install-iptables:
111 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
112 tar -jxf iptables-1.2.11.tar.bz2
113 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
115 install-%: DESTDIR=
116 install-%: %
117 @: # do nothing
119 help:
120 @echo 'Installation targets:'
121 @echo ' install - build and install everything'
122 @echo ' install-xen - build and install the Xen hypervisor'
123 @echo ' install-tools - build and install the control tools'
124 @echo ' install-kernels - build and install guest kernels'
125 @echo ' install-docs - build and install documentation'
126 @echo ''
127 @echo 'Building targets:'
128 @echo ' dist - build and install everything into local dist directory'
129 @echo ' world - clean everything, delete guest kernel build'
130 @echo ' trees then make dist'
131 @echo ' xen - build and install Xen hypervisor'
132 @echo ' tools - build and install tools'
133 @echo ' kernels - build and install guest kernels'
134 @echo ' kbuild - synonym for make kernels'
135 @echo ' docs - build and install docs'
136 @echo ''
137 @echo 'Cleaning targets:'
138 @echo ' clean - clean the Xen, tools and docs (but not'
139 @echo ' guest kernel) trees'
140 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
141 @echo ' build trees'
142 @echo ' kdelete - delete guest kernel build trees'
143 @echo ' kclean - clean guest kernel build trees'
144 @echo ''
145 @echo 'Dependency installation targets:'
146 @echo ' install-twisted - install the Twisted Matrix Framework'
147 @echo ' install-logging - install the Python Logging package'
148 @echo ' install-iptables - install iptables tools'
149 @echo ''
150 @echo 'Miscellaneous targets:'
151 @echo ' mkpatches - make patches against vanilla kernels from'
152 @echo ' sparse trees'
153 @echo ' uninstall - attempt to remove installed Xen tools (use'
154 @echo ' with extreme care!)'
156 # Use this target with extreme care!
157 uninstall: DESTDIR=
158 uninstall: D=$(DESTDIR)
159 uninstall:
160 [ ! -d $(D)/etc/xen ] || mv -f $(D)/etc/xen $(D)/etc/xen.old
161 rm -rf $(D)/etc/init.d/xend*
162 rm -rf $(D)/usr/lib/libxc* $(D)/usr/lib/libxutil*
163 rm -rf $(D)/usr/lib/python/xen $(D)/usr/include/xen
164 rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
165 rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
166 rm -rf $(D)/usr/sbin/netfix
167 rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm $(D)/var/lib/xen
168 rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace*
169 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm
170 rm -rf $(D)/boot/*xen*
172 # Legacy targets for compatibility
173 linux24:
174 $(MAKE) linux-2.4-xen0-build
175 $(MAKE) linux-2.4-xenU-build
177 linux26:
178 $(MAKE) linux-2.6-xen0-build
179 $(MAKE) linux-2.6-xenU-build
181 netbsd20:
182 $(MAKE) netbsd-2.0-xenU-build