ia64/xen-unstable

view Makefile @ 13708:58344c358aa0

Add task.allowed_operations field, and task.cancel message. The
task_status_type enum has gained cancelling and cancelled values.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sun Jan 28 18:05:13 2007 +0000 (2007-01-28)
parents 583441e296a1
children b51ed174fe8f
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 build-headers
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: build-headers
63 $(MAKE) -C xen install
65 .PHONY: install-tools
66 install-tools: build-headers
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 # generate header files
86 .PHONY: build-headers
87 build-headers:
88 $(MAKE) -C xen/include/public/foreign
90 # Delete the kernel build trees entirely
91 .PHONY: kdelete
92 kdelete:
93 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
95 # Clean the kernel build trees
96 .PHONY: kclean
97 kclean:
98 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
100 # Make patches from kernel sparse trees
101 .PHONY: mkpatches
102 mkpatches:
103 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; 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 docs clean
121 # clean, but blow away kernel build tree plus tarballs
122 .PHONY: distclean
123 distclean:
124 $(MAKE) -C xen distclean
125 $(MAKE) -C tools distclean
126 $(MAKE) -C docs distclean
127 rm -rf dist patches/tmp
128 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
129 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
130 rm -rf patches/*/.makedep
132 # Linux name for GNU distclean
133 .PHONY: mrproper
134 mrproper: distclean
136 .PHONY: help
137 help:
138 @echo 'Installation targets:'
139 @echo ' install - build and install everything'
140 @echo ' install-xen - build and install the Xen hypervisor'
141 @echo ' install-tools - build and install the control tools'
142 @echo ' install-kernels - build and install guest kernels'
143 @echo ' install-docs - build and install user documentation'
144 @echo ''
145 @echo 'Building targets:'
146 @echo ' dist - build and install everything into local dist directory'
147 @echo ' world - clean everything, delete guest kernel build'
148 @echo ' trees then make dist'
149 @echo ' xen - build and install Xen hypervisor'
150 @echo ' tools - build and install tools'
151 @echo ' kernels - build and install guest kernels'
152 @echo ' kbuild - synonym for make kernels'
153 @echo ' docs - build and install user documentation'
154 @echo ' dev-docs - build developer-only documentation'
155 @echo ''
156 @echo 'Cleaning targets:'
157 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
158 @echo ' distclean - clean plus delete kernel build trees and'
159 @echo ' local downloaded files'
160 @echo ' kdelete - delete guest kernel build trees'
161 @echo ' kclean - clean guest kernel build trees'
162 @echo ''
163 @echo 'Miscellaneous targets:'
164 @echo ' prep-kernels - prepares kernel directories, does not build'
165 @echo ' mkpatches - make patches against vanilla kernels from'
166 @echo ' sparse trees'
167 @echo ' uninstall - attempt to remove installed Xen tools'
168 @echo ' (use with extreme care!)'
169 @echo
170 @echo 'Environment:'
171 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
172 @echo ' - native python install or dist'
173 @echo ' install into prefix/lib/python<VERSION>'
174 @echo ' instead of <PREFIX>/lib/python'
175 @echo ' true if set to non-empty value, false otherwise'
177 # Use this target with extreme care!
178 .PHONY: uninstall
179 uninstall: D=$(DESTDIR)
180 uninstall:
181 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
182 rm -rf $(D)/etc/init.d/xend*
183 rm -rf $(D)/etc/hotplug/xen-backend.agent
184 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
185 rm -f $(D)/etc/udev/xen-backend.rules
186 rm -f $(D)/etc/sysconfig/xendomains
187 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
188 rm -rf $(D)/boot/*xen*
189 rm -rf $(D)/lib/modules/*xen*
190 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
191 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
192 rm -rf $(D)/usr/bin/xc_shadow
193 rm -rf $(D)/usr/bin/pygrub
194 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
195 rm -rf $(D)/usr/bin/xsls
196 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
197 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
198 rm -rf $(D)/usr/include/xen
199 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
200 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
201 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/python/grub
202 rm -rf $(D)/usr/$(LIBDIR)/xen/
203 rm -rf $(D)/usr/lib/xen/
204 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
205 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
206 rm -rf $(D)/usr/share/doc/xen
207 rm -rf $(D)/usr/share/xen
208 rm -rf $(D)/usr/share/man/man1/xen*
209 rm -rf $(D)/usr/share/man/man8/xen*
211 # Legacy targets for compatibility
212 .PHONY: linux26
213 linux26:
214 $(MAKE) 'KERNELS=linux-2.6*' kernels