ia64/xen-unstable

view Makefile @ 16386:614dad9f8fdc

pvfb: PVFB SDL backend chokes on bogus screen updates

Bogus screen update requests from buggy or malicous frontend make SDL
crash. The VNC backend silently ignores them. Catch and log them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Nov 16 16:53:43 2007 +0000 (2007-11-16)
parents 26fb702fd8cf
children 9ce9d43a76a2
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 ifeq ($(XEN_TARGET_X86_PAE),y)
17 export pae=y
18 endif
20 # build and install everything into the standard system directories
21 .PHONY: install
22 install: install-xen install-kernels install-tools install-docs
24 .PHONY: build
25 build: kernels
26 $(MAKE) -C xen build
27 $(MAKE) -C tools build
28 $(MAKE) -C docs build
30 # The test target is for unit tests that can run without an installation. Of
31 # course, many tests require a machine running Xen itself, and these are
32 # handled elsewhere.
33 .PHONY: test
34 test:
35 $(MAKE) -C tools/python test
37 # build and install everything into local dist directory
38 .PHONY: dist
39 dist: DESTDIR=$(DISTDIR)/install
40 dist: dist-xen dist-kernels dist-tools dist-docs
41 $(INSTALL_DIR) $(DISTDIR)/check
42 $(INSTALL_DATA) ./COPYING $(DISTDIR)
43 $(INSTALL_DATA) ./README $(DISTDIR)
44 $(INSTALL_PROG) ./install.sh $(DISTDIR)
45 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
46 dist-%: DESTDIR=$(DISTDIR)/install
47 dist-%: install-%
48 @: # do nothing
50 # Legacy dist targets
51 .PHONY: xen tools kernels docs
52 xen: dist-xen
53 tools: dist-tools
54 kernels: dist-kernels
55 docs: dist-docs
57 .PHONY: prep-kernels
58 prep-kernels:
59 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
61 .PHONY: install-xen
62 install-xen:
63 $(MAKE) -C xen install
65 .PHONY: install-tools
66 install-tools:
67 $(MAKE) -C tools install
69 .PHONY: install-kernels
70 install-kernels:
71 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
73 .PHONY: install-docs
74 install-docs:
75 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
77 .PHONY: dev-docs
78 dev-docs:
79 $(MAKE) -C docs dev-docs
81 # Build all the various kernels and modules
82 .PHONY: kbuild
83 kbuild: kernels
85 # Delete the kernel build trees entirely
86 .PHONY: kdelete
87 kdelete:
88 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
90 # Clean the kernel build trees
91 .PHONY: kclean
92 kclean:
93 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
95 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
96 # and place them in the install directory. 'make install' should then
97 # copy them to the normal system directories
98 .PHONY: world
99 world:
100 $(MAKE) clean
101 $(MAKE) kdelete
102 $(MAKE) dist
104 # clean doesn't do a kclean
105 .PHONY: clean
106 clean::
107 $(MAKE) -C xen clean
108 $(MAKE) -C tools clean
109 $(MAKE) -C docs clean
111 # clean, but blow away kernel build tree plus tarballs
112 .PHONY: distclean
113 distclean:
114 $(MAKE) -C xen distclean
115 $(MAKE) -C tools distclean
116 $(MAKE) -C docs distclean
117 rm -rf dist patches/tmp
118 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
119 rm -rf patches/*/.makedep
121 # Linux name for GNU distclean
122 .PHONY: mrproper
123 mrproper: distclean
125 .PHONY: help
126 help:
127 @echo 'Installation targets:'
128 @echo ' install - build and install everything'
129 @echo ' install-xen - build and install the Xen hypervisor'
130 @echo ' install-tools - build and install the control tools'
131 @echo ' install-kernels - build and install guest kernels'
132 @echo ' install-docs - build and install user documentation'
133 @echo ''
134 @echo 'Building targets:'
135 @echo ' dist - build and install everything into local dist directory'
136 @echo ' world - clean everything, delete guest kernel build'
137 @echo ' trees then make dist'
138 @echo ' xen - build and install Xen hypervisor'
139 @echo ' tools - build and install tools'
140 @echo ' kernels - build and install guest kernels'
141 @echo ' kbuild - synonym for make kernels'
142 @echo ' docs - build and install user documentation'
143 @echo ' dev-docs - build developer-only documentation'
144 @echo ''
145 @echo 'Cleaning targets:'
146 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
147 @echo ' distclean - clean plus delete kernel build trees and'
148 @echo ' local downloaded files'
149 @echo ' kdelete - delete guest kernel build trees'
150 @echo ' kclean - clean guest kernel build trees'
151 @echo ''
152 @echo 'Miscellaneous targets:'
153 @echo ' prep-kernels - prepares kernel directories, does not build'
154 @echo ' uninstall - attempt to remove installed Xen tools'
155 @echo ' (use with extreme care!)'
156 @echo
157 @echo 'Trusted Boot (tboot) targets:'
158 @echo ' build-tboot - download and build the tboot module'
159 @echo ' install-tboot - download, build, and install the tboot module'
160 @echo ' clean-tboot - clean the tboot module if it exists'
161 @echo
162 @echo 'Environment:'
163 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
164 @echo ' - native python install or dist'
165 @echo ' install into prefix/lib/python<VERSION>'
166 @echo ' instead of <PREFIX>/lib/python'
167 @echo ' true if set to non-empty value, false otherwise'
169 # Use this target with extreme care!
170 .PHONY: uninstall
171 uninstall: D=$(DESTDIR)
172 uninstall:
173 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
174 rm -rf $(D)/etc/init.d/xend*
175 rm -rf $(D)/etc/hotplug/xen-backend.agent
176 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
177 rm -f $(D)/etc/udev/xen-backend.rules
178 rm -f $(D)/etc/sysconfig/xendomains
179 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
180 rm -rf $(D)/boot/*xen*
181 rm -rf $(D)/lib/modules/*xen*
182 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
183 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
184 rm -rf $(D)/usr/bin/xc_shadow
185 rm -rf $(D)/usr/bin/pygrub
186 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
187 rm -rf $(D)/usr/bin/xsls
188 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
189 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
190 rm -rf $(D)/usr/include/xen
191 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
192 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
193 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/python/grub
194 rm -rf $(D)/usr/$(LIBDIR)/xen/
195 rm -rf $(D)/usr/lib/xen/
196 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
197 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
198 rm -rf $(D)/usr/share/doc/xen
199 rm -rf $(D)/usr/share/xen
200 rm -rf $(D)/usr/share/man/man1/xen*
201 rm -rf $(D)/usr/share/man/man8/xen*
202 rm -rf $(D)/boot/tboot*
204 # Legacy targets for compatibility
205 .PHONY: linux26
206 linux26:
207 $(MAKE) 'KERNELS=linux-2.6*' kernels
210 #
211 # tboot targets
212 #
214 TBOOT_TARFILE = tboot-20071029.tar.gz
215 TBOOT_BASE_URL = http://downloads.sourceforge.net/tboot
217 .PHONY: build-tboot
218 build-tboot: download_tboot
219 $(MAKE) -C tboot build
221 .PHONY: install-tboot
222 install-tboot: download_tboot
223 $(MAKE) -C tboot install
225 .PHONY: clean-tboot
226 clean-tboot:
227 [ ! -d tboot ] || $(MAKE) -C tboot clean
229 .PHONY: distclean-tboot
230 distclean-tboot:
231 [ ! -d tboot ] || $(MAKE) -C tboot distclean
233 .PHONY: download_tboot
234 download_tboot: tboot/Makefile
236 tboot/Makefile: tboot/$(TBOOT_TARFILE)
237 [ -e tboot/Makefile ] || tar -xzf tboot/$(TBOOT_TARFILE) -C tboot/ --strip-components 1
239 tboot/$(TBOOT_TARFILE):
240 mkdir -p tboot
241 wget -O tboot/$(TBOOT_TARFILE) $(TBOOT_BASE_URL)/$(TBOOT_TARFILE)