ia64/xen-unstable

view Makefile @ 7246:76a7a7aa27e4

User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Oct 06 17:02:38 2005 +0100 (2005-10-06)
parents cd228621e1fd
children f1abe953e401
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
6 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
7 # You may use wildcards in the above e.g. KERNELS=*2.4*
9 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
11 # Export target architecture overrides to Xen and Linux sub-trees.
12 ifneq ($(XEN_TARGET_ARCH),)
13 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
14 export XEN_TARGET_ARCH SUBARCH
15 endif
17 # Default target must appear before any include lines
18 all: dist
20 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 .PHONY: all dist install xen kernels tools dev-docs docs world clean
29 .PHONY: mkpatches mrproper kbuild kdelete kclean
31 # build and install everything into the standard system directories
32 install: install-xen install-kernels install-tools install-docs
34 build: kernels
35 $(MAKE) -C xen build
36 $(MAKE) -C tools build
37 $(MAKE) -C docs build
39 # The test target is for unit tests that can run without an installation. Of
40 # course, many tests require a machine running Xen itself, and these are
41 # handled elsewhere.
42 test:
43 $(MAKE) -C tools/python test
45 # build and install everything into local dist directory
46 dist: DESTDIR=$(DISTDIR)/install
47 dist: dist-xen dist-kernels dist-tools dist-docs
48 $(INSTALL_DIR) $(DISTDIR)/check
49 $(INSTALL_DATA) ./COPYING $(DISTDIR)
50 $(INSTALL_DATA) ./README $(DISTDIR)
51 $(INSTALL_PROG) ./install.sh $(DISTDIR)
52 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
53 dist-%: DESTDIR=$(DISTDIR)/install
54 dist-%: install-%
55 @: # do nothing
57 # Legacy dist targets
58 xen: dist-xen
59 tools: dist-tools
60 kernels: dist-kernels
61 docs: dist-docs
63 install-xen:
64 $(MAKE) -C xen install
66 install-tools:
67 $(MAKE) -C tools install
69 install-kernels:
70 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
72 install-docs:
73 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
75 dev-docs:
76 $(MAKE) -C docs dev-docs
78 # Build all the various kernels and modules
79 kbuild: kernels
81 # Delete the kernel build trees entirely
82 kdelete:
83 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
85 # Clean the kernel build trees
86 kclean:
87 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
89 # Make patches from kernel sparse trees
90 mkpatches:
91 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
93 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
94 # and place them in the install directory. 'make install' should then
95 # copy them to the normal system directories
96 world:
97 $(MAKE) clean
98 $(MAKE) kdelete
99 $(MAKE) dist
101 # clean doesn't do a kclean
102 clean::
103 $(MAKE) -C xen clean
104 $(MAKE) -C tools clean
105 $(MAKE) -C docs clean
107 # clean, but blow away kernel build tree plus tarballs
108 distclean: clean
109 rm -rf dist patches/tmp
110 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
111 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
113 # Linux name for GNU distclean
114 mrproper: distclean
116 install-logging: LOGGING=logging-0.4.9.2
117 install-logging:
118 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
119 tar -zxf $(LOGGING).tar.gz
120 cd $(LOGGING) && python setup.py install
122 # handy target to upgrade iptables (use rpm or apt-get in preference)
123 install-iptables:
124 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
125 tar -jxf iptables-1.2.11.tar.bz2
126 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
128 help:
129 @echo 'Installation targets:'
130 @echo ' install - build and install everything'
131 @echo ' install-xen - build and install the Xen hypervisor'
132 @echo ' install-tools - build and install the control tools'
133 @echo ' install-kernels - build and install guest kernels'
134 @echo ' install-docs - build and install user documentation'
135 @echo ''
136 @echo 'Building targets:'
137 @echo ' dist - build and install everything into local dist directory'
138 @echo ' world - clean everything, delete guest kernel build'
139 @echo ' trees then make dist'
140 @echo ' xen - build and install Xen hypervisor'
141 @echo ' tools - build and install tools'
142 @echo ' kernels - build and install guest kernels'
143 @echo ' kbuild - synonym for make kernels'
144 @echo ' docs - build and install user documentation'
145 @echo ' dev-docs - build developer-only documentation'
146 @echo ''
147 @echo 'Cleaning targets:'
148 @echo ' clean - clean the Xen, tools and docs (but not'
149 @echo ' guest kernel) trees'
150 @echo ' distclean - clean plus delete kernel tarballs and kernel'
151 @echo ' build trees'
152 @echo ' kdelete - delete guest kernel build trees'
153 @echo ' kclean - clean guest kernel build trees'
154 @echo ''
155 @echo 'Dependency installation targets:'
156 @echo ' install-logging - install the Python Logging package'
157 @echo ' install-iptables - install iptables tools'
158 @echo ''
159 @echo 'Miscellaneous targets:'
160 @echo ' mkpatches - make patches against vanilla kernels from'
161 @echo ' sparse trees'
162 @echo ' uninstall - attempt to remove installed Xen tools (use'
163 @echo ' with extreme care!)'
165 # Use this target with extreme care!
166 uninstall: D=$(DESTDIR)
167 uninstall:
168 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
169 rm -rf $(D)/etc/init.d/xend*
170 rm -rf $(D)/etc/hotplug/xen-backend.agent
171 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
172 rm -rf $(D)/boot/*xen*
173 rm -rf $(D)/lib/modules/*xen*
174 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
175 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
176 rm -rf $(D)/usr/bin/xc_shadow
177 rm -rf $(D)/usr/include/xenctrl.h
178 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
179 rm -rf $(D)/usr/include/xen
180 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
181 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
182 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/xen
183 rm -rf $(D)/usr/libexec/xen
184 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
185 rm -rf $(D)/usr/share/doc/xen
186 rm -rf $(D)/usr/share/xen
187 rm -rf $(D)/usr/share/man/man1/xen*
188 rm -rf $(D)/usr/share/man/man8/xen*
190 # Legacy targets for compatibility
191 linux24:
192 $(MAKE) 'KERNELS=linux-2.4*' kernels
194 linux26:
195 $(MAKE) 'KERNELS=linux-2.6*' kernels
197 netbsd20:
198 $(MAKE) netbsd-2.0-xenU-build