ia64/xen-unstable

view Makefile @ 11671:500043f8ccff

[BLKTAP] have blktap use a dynamic major
blktap currently uses a hardcoded major of 254 for the device. This is
not robust in anyway and needs to be dynamic.

Note: it is better not to have the daemon create the node, and have udev
create it instead. But since the daemon currently creates the node
anyway, it is still the way this is done. That change needs to be made
at another time.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
author Andrew Warfield <andy@xensource.com>
date Thu Sep 28 12:47:45 2006 -0700 (2006-09-28)
parents ef80b6e4e03a
children be8039f8bc14
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 KERNELS ?= linux-2.6-xen
6 # You may use wildcards in the above e.g. KERNELS=*2.6*
8 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
10 # Export target architecture overrides to Xen and Linux sub-trees.
11 ifneq ($(XEN_TARGET_ARCH),)
12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
13 export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
14 endif
16 # Default target must appear before any include lines
17 .PHONY: all
18 all: dist
20 export XEN_ROOT=$(CURDIR)
21 include Config.mk
22 include buildconfigs/Rules.mk
24 ifeq ($(XEN_TARGET_X86_PAE),y)
25 export pae=y
26 endif
28 # build and install everything into the standard system directories
29 .PHONY: install
30 install: install-xen install-kernels install-tools install-docs
32 .PHONY: build
33 build: kernels
34 $(MAKE) -C xen build
35 $(MAKE) -C tools build
36 $(MAKE) -C docs build
38 # The test target is for unit tests that can run without an installation. Of
39 # course, many tests require a machine running Xen itself, and these are
40 # handled elsewhere.
41 .PHONY: test
42 test:
43 $(MAKE) -C tools/python test
45 # build and install everything into local dist directory
46 .PHONY: dist
47 dist: DESTDIR=$(DISTDIR)/install
48 dist: dist-xen dist-kernels dist-tools dist-docs
49 $(INSTALL_DIR) $(DISTDIR)/check
50 $(INSTALL_DATA) ./COPYING $(DISTDIR)
51 $(INSTALL_DATA) ./README $(DISTDIR)
52 $(INSTALL_PROG) ./install.sh $(DISTDIR)
53 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
54 dist-%: DESTDIR=$(DISTDIR)/install
55 dist-%: install-%
56 @: # do nothing
58 # Legacy dist targets
59 .PHONY: xen tools kernels docs
60 xen: dist-xen
61 tools: dist-tools
62 kernels: dist-kernels
63 docs: dist-docs
65 .PHONY: prep-kernels
66 prep-kernels:
67 for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
69 .PHONY: install-xen
70 install-xen:
71 $(MAKE) -C xen install
73 .PHONY: install-tools
74 install-tools:
75 $(MAKE) -C tools install
77 .PHONY: install-kernels
78 install-kernels:
79 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
81 .PHONY: install-docs
82 install-docs:
83 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
85 .PHONY: dev-docs
86 dev-docs:
87 $(MAKE) -C docs dev-docs
89 # Build all the various kernels and modules
90 .PHONY: kbuild
91 kbuild: kernels
93 # Delete the kernel build trees entirely
94 .PHONY: kdelete
95 kdelete:
96 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
98 # Clean the kernel build trees
99 .PHONY: kclean
100 kclean:
101 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
103 # Make patches from kernel sparse trees
104 .PHONY: mkpatches
105 mkpatches:
106 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
108 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
109 # and place them in the install directory. 'make install' should then
110 # copy them to the normal system directories
111 .PHONY: world
112 world:
113 $(MAKE) clean
114 $(MAKE) kdelete
115 $(MAKE) dist
117 # clean doesn't do a kclean
118 .PHONY: clean
119 clean::
120 $(MAKE) -C xen clean
121 $(MAKE) -C tools clean
122 $(MAKE) -C docs clean
124 # clean, but blow away kernel build tree plus tarballs
125 .PHONY: distclean
126 distclean:
127 $(MAKE) -C xen distclean
128 $(MAKE) -C tools distclean
129 $(MAKE) -C docs distclean
130 rm -rf dist patches/tmp
131 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
132 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
133 rm -rf patches/*/.makedep
135 # Linux name for GNU distclean
136 .PHONY: mrproper
137 mrproper: distclean
139 .PHONY: help
140 help:
141 @echo 'Installation targets:'
142 @echo ' install - build and install everything'
143 @echo ' install-xen - build and install the Xen hypervisor'
144 @echo ' install-tools - build and install the control tools'
145 @echo ' install-kernels - build and install guest kernels'
146 @echo ' install-docs - build and install user documentation'
147 @echo ''
148 @echo 'Building targets:'
149 @echo ' dist - build and install everything into local dist directory'
150 @echo ' world - clean everything, delete guest kernel build'
151 @echo ' trees then make dist'
152 @echo ' xen - build and install Xen hypervisor'
153 @echo ' tools - build and install tools'
154 @echo ' kernels - build and install guest kernels'
155 @echo ' kbuild - synonym for make kernels'
156 @echo ' docs - build and install user documentation'
157 @echo ' dev-docs - build developer-only documentation'
158 @echo ''
159 @echo 'Cleaning targets:'
160 @echo ' clean - clean the Xen, tools and docs (but not guest kernel trees)'
161 @echo ' distclean - clean plus delete kernel build trees and'
162 @echo ' local downloaded files'
163 @echo ' kdelete - delete guest kernel build trees'
164 @echo ' kclean - clean guest kernel build trees'
165 @echo ''
166 @echo 'Miscellaneous targets:'
167 @echo ' prep-kernels - prepares kernel directories, does not build'
168 @echo ' mkpatches - make patches against vanilla kernels from'
169 @echo ' sparse trees'
170 @echo ' uninstall - attempt to remove installed Xen tools'
171 @echo ' (use with extreme care!)'
172 @echo
173 @echo 'Environment:'
174 @echo ' XEN_PYTHON_NATIVE_INSTALL=y'
175 @echo ' - native python install or dist'
176 @echo ' install into prefix/lib/python<VERSION>'
177 @echo ' instead of <PREFIX>/lib/python'
178 @echo ' true if set to non-empty value, false otherwise'
180 # Use this target with extreme care!
181 .PHONY: uninstall
182 uninstall: D=$(DESTDIR)
183 uninstall:
184 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
185 rm -rf $(D)/etc/init.d/xend*
186 rm -rf $(D)/etc/hotplug/xen-backend.agent
187 rm -f $(D)/etc/udev/rules.d/xen-backend.rules
188 rm -f $(D)/etc/udev/xen-backend.rules
189 rm -f $(D)/etc/sysconfig/xendomains
190 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
191 rm -rf $(D)/boot/*xen*
192 rm -rf $(D)/lib/modules/*xen*
193 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
194 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
195 rm -rf $(D)/usr/bin/xc_shadow
196 rm -rf $(D)/usr/bin/pygrub
197 rm -rf $(D)/usr/bin/setsize $(D)/usr/bin/tbctl
198 rm -rf $(D)/usr/bin/xsls
199 rm -rf $(D)/usr/include/xenctrl.h $(D)/usr/include/xenguest.h
200 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
201 rm -rf $(D)/usr/include/xen
202 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
203 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
204 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/python/grub
205 rm -rf $(D)/usr/$(LIBDIR)/xen/
206 rm -rf $(D)/usr/lib/xen/
207 rm -rf $(D)/usr/local/sbin/setmask $(D)/usr/local/sbin/xen*
208 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
209 rm -rf $(D)/usr/share/doc/xen
210 rm -rf $(D)/usr/share/xen
211 rm -rf $(D)/usr/share/man/man1/xen*
212 rm -rf $(D)/usr/share/man/man8/xen*
214 # Legacy targets for compatibility
215 .PHONY: linux26
216 linux26:
217 $(MAKE) 'KERNELS=linux-2.6*' kernels