ia64/xen-unstable

view Makefile @ 18026:f454f2cac170

x86 hvm: New boot option 'softtsc' to cause RDTSC to be trapped-and-emulated.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jul 10 15:45:18 2008 +0100 (2008-07-10)
parents e10f43449463
children 63317b6c3eab
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 # Default target must appear before any include lines
6 .PHONY: all
7 all: dist
9 export XEN_ROOT=$(CURDIR)
10 include Config.mk
12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
14 include buildconfigs/Rules.mk
16 # build and install everything into the standard system directories
17 .PHONY: install
18 ifdef CONFIG_STUBDOM
19 install: install-stubdom
20 endif
21 install: install-xen install-kernels install-tools install-docs
23 .PHONY: build
24 build: kernels
25 $(MAKE) -C xen build
26 $(MAKE) -C tools build
27 ifdef CONFIG_STUBDOM
28 $(MAKE) -C stubdom build
29 endif
30 $(MAKE) -C docs build
32 # The test target is for unit tests that can run without an installation. Of
33 # course, many tests require a machine running Xen itself, and these are
34 # handled elsewhere.
35 .PHONY: test
36 test:
37 $(MAKE) -C tools/python test
39 # build and install everything into local dist directory
40 .PHONY: dist
41 dist: DESTDIR=$(DISTDIR)/install
42 ifdef CONFIG_STUBDOM
43 dist: dist-stubdom
44 endif
45 dist: dist-xen dist-kernels dist-tools dist-docs
46 $(INSTALL_DIR) $(DISTDIR)/check
47 $(INSTALL_DATA) ./COPYING $(DISTDIR)
48 $(INSTALL_DATA) ./README $(DISTDIR)
49 $(INSTALL_PROG) ./install.sh $(DISTDIR)
50 $(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
51 dist-%: DESTDIR=$(DISTDIR)/install
52 dist-%: install-%
53 @: # do nothing
55 # Legacy dist targets
56 .PHONY: xen tools stubdom kernels docs
57 xen: dist-xen
58 tools: dist-tools
59 kernels: dist-kernels
60 stubdom: dist-stubdom
61 docs: dist-docs
63 .PHONY: prep-kernels
64 prep-kernels:
65 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
67 .PHONY: install-xen
68 install-xen:
69 $(MAKE) -C xen install
71 .PHONY: install-tools
72 install-tools:
73 $(MAKE) -C tools install
75 .PHONY: install-kernels
76 install-kernels:
77 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
79 .PHONY: install-stubdom
80 install-stubdom:
81 $(MAKE) -C stubdom install
83 .PHONY: install-docs
84 install-docs:
85 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
87 .PHONY: dev-docs
88 dev-docs:
89 $(MAKE) -C docs dev-docs
91 # Build all the various kernels and modules
92 .PHONY: kbuild
93 kbuild: kernels
95 # Delete the kernel build trees entirely
96 .PHONY: kdelete
97 kdelete:
98 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
100 # Clean the kernel build trees
101 .PHONY: kclean
102 kclean:
103 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
105 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
106 # and place them in the install directory. 'make install' should then
107 # copy them to the normal system directories
108 .PHONY: world
109 world:
110 $(MAKE) clean
111 $(MAKE) kdelete
112 $(MAKE) dist
114 # clean doesn't do a kclean
115 .PHONY: clean
116 clean::
117 $(MAKE) -C xen clean
118 $(MAKE) -C tools clean
119 $(MAKE) -C stubdom crossclean
120 $(MAKE) -C docs clean
122 # clean, but blow away kernel build tree plus tarballs
123 .PHONY: distclean
124 distclean:
125 $(MAKE) -C xen distclean
126 $(MAKE) -C tools distclean
127 $(MAKE) -C stubdom distclean
128 $(MAKE) -C docs distclean
129 rm -rf dist patches/tmp
130 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
131 rm -rf patches/*/.makedep
133 # Linux name for GNU distclean
134 .PHONY: mrproper
135 mrproper: distclean
137 # Prepare for source tarball
138 .PHONY: src-tarball
139 src-tarball: distclean
140 $(MAKE) -C xen .banner
141 rm -rf xen/tools/figlet .[a-z]*
142 $(MAKE) -C xen distclean
144 .PHONY: help
145 help:
146 @echo 'Installation targets:'
147 @echo ' install - build and install everything'
148 @echo ' install-xen - build and install the Xen hypervisor'
149 @echo ' install-tools - build and install the control tools'
150 @echo ' install-kernels - build and install guest kernels'
151 @echo ' install-stubdom - build and install the stubdomain images'
152 @echo ' install-docs - build and install user documentation'
153 @echo ''
154 @echo 'Building targets:'
155 @echo ' dist - build and install everything into local dist directory'
156 @echo ' world - clean everything, delete guest kernel build'
157 @echo ' trees then make dist'
158 @echo ' xen - build and install Xen hypervisor'
159 @echo ' tools - build and install tools'
160 @echo ' stubdomain - build and install the stubdomain images'
161 @echo ' kernels - build and install guest kernels'
162 @echo ' kbuild - synonym for make kernels'
163 @echo ' docs - build and install user documentation'
164 @echo ' dev-docs - build developer-only documentation'
165 @echo ''
166 @echo 'Cleaning targets:'
167 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
168 @echo ' distclean - clean plus delete kernel build trees and'
169 @echo ' local downloaded files'
170 @echo ' kdelete - delete guest kernel build trees'
171 @echo ' kclean - clean guest kernel build trees'
172 @echo ''
173 @echo 'Miscellaneous targets:'
174 @echo ' prep-kernels - prepares kernel directories, does not build'
175 @echo ' uninstall - attempt to remove installed Xen tools'
176 @echo ' (use with extreme care!)'
177 @echo
178 @echo 'Trusted Boot (tboot) targets:'
179 @echo ' build-tboot - download and build the tboot module'
180 @echo ' install-tboot - download, build, and install the tboot module'
181 @echo ' clean-tboot - clean the tboot module if it exists'
182 @echo
183 @echo 'Environment:'
184 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
185 @echo ' - native python install or dist'
186 @echo ' install into prefix/lib/python<VERSION>'
187 @echo ' instead of <PREFIX>/lib/python'
188 @echo ' true if set to non-empty value, false otherwise'
190 # Use this target with extreme care!
191 .PHONY: uninstall
192 uninstall: D=$(DESTDIR)
193 uninstall:
194 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
195 rm -rf $(D)/etc/init.d/xend*
196 rm -rf $(D)/etc/hotplug/xen-backend.agent
197 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
198 rm -f $(D)/etc/udev/xen-backend.rules
199 rm -f $(D)/etc/sysconfig/xendomains
200 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
201 rm -rf $(D)/boot/*xen*
202 rm -rf $(D)/lib/modules/*xen*
203 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
204 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
205 rm -rf $(D)/usr/bin/xc_shadow
206 rm -rf $(D)/usr/bin/pygrub
207 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
208 rm -rf $(D)/usr/bin/xsls
209 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
210 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
211 rm -rf $(D)/usr/include/xen
212 rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
213 rm -rf $(D)$(LIBDIR)/libxenstore*
214 rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub
215 rm -rf $(D)$(LIBDIR)/xen/
216 rm -rf $(D)/usr/lib/xen/
217 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
218 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
219 rm -rf $(D)/usr/share/doc/xen
220 rm -rf $(D)/usr/share/xen
221 rm -rf $(D)/usr/share/man/man1/xen*
222 rm -rf $(D)/usr/share/man/man8/xen*
223 rm -rf $(D)/boot/tboot*
225 # Legacy targets for compatibility
226 .PHONY: linux26
227 linux26:
228 $(MAKE) 'KERNELS=linux-2.6*' kernels
231 #
232 # tboot targets
233 #
235 TBOOT_TARFILE = tboot-20080613.tar.gz
236 TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
238 .PHONY: build-tboot
239 build-tboot: download_tboot
240 $(MAKE) -C tboot build
242 .PHONY: install-tboot
243 install-tboot: download_tboot
244 $(MAKE) -C tboot install
246 .PHONY: dist-tboot
247 dist-tboot: download_tboot
248 $(MAKE) DESTDIR=$(DISTDIR)/install -C tboot dist
250 .PHONY: clean-tboot
251 clean-tboot:
252 [ ! -d tboot ] || $(MAKE) -C tboot clean
254 .PHONY: distclean-tboot
255 distclean-tboot:
256 [ ! -d tboot ] || $(MAKE) -C tboot distclean
258 .PHONY: download_tboot
259 download_tboot: tboot/Makefile
261 tboot/Makefile: tboot/$(TBOOT_TARFILE)
262 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
264 tboot/$(TBOOT_TARFILE):
265 mkdir -p tboot
266 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)