ia64/xen-unstable

view Makefile @ 4591:6375127fdf23

bitkeeper revision 1.1311.1.1 (426641eeBv97w6sl983zxeR4Dc3Utg)

Cleanup page table handling. Add macros to access page table
entries, fixup plenty of places in the code to use the page
table types instead of "unsigned long".

Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Wed Apr 20 11:50:06 2005 +0000 (2005-04-20)
parents 3dac50183187
children 8d23fe716501
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 # Default is to install to local 'dist' directory.
6 DISTDIR ?= $(CURDIR)/dist
7 DESTDIR ?= $(DISTDIR)/install
9 INSTALL := install
10 INSTALL_DIR := $(INSTALL) -d -m0755
11 INSTALL_DATA := $(INSTALL) -m0644
12 INSTALL_PROG := $(INSTALL) -m0755
14 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
15 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
16 # You may use wildcards in the above e.g. KERNELS=*2.4*
18 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
19 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
20 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
22 export DESTDIR
24 # Export target architecture overrides to Xen and Linux sub-trees.
25 ifneq ($(XEN_TARGET_ARCH),)
26 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
27 export XEN_TARGET_ARCH SUBARCH
28 endif
30 include Config.mk
31 include buildconfigs/Rules.mk
33 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
34 .PHONY: kbuild kdelete kclean
36 all: dist
38 # build and install everything into the standard system directories
39 install: install-xen install-tools install-kernels install-docs
41 build: kernels
42 $(MAKE) -C xen build
43 $(MAKE) -C tools build
44 $(MAKE) -C docs build
46 # build and install everything into local dist directory
47 dist: xen tools kernels 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
54 xen:
55 $(MAKE) -C xen install
57 tools:
58 $(MAKE) -C tools install
60 kernels:
61 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
63 docs:
64 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
66 # Build all the various kernels and modules
67 kbuild: kernels
69 # Delete the kernel build trees entirely
70 kdelete:
71 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
73 # Clean the kernel build trees
74 kclean:
75 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
77 # Make patches from kernel sparse trees
78 mkpatches:
79 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch || exit 1; done
82 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
83 # and place them in the install directory. 'make install' should then
84 # copy them to the normal system directories
85 world:
86 $(MAKE) clean
87 $(MAKE) kdelete
88 $(MAKE) dist
90 # clean doesn't do a kclean
91 clean:
92 $(MAKE) -C xen clean
93 $(MAKE) -C tools clean
94 $(MAKE) -C docs clean
96 # clean, but blow away kernel build tree plus tar balls
97 mrproper: clean
98 rm -rf dist patches/tmp
99 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
100 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
102 install-twisted:
103 wget http://www.twistedmatrix.com/products/get-current.epy
104 tar -zxf Twisted-*.tar.gz
105 cd Twisted-* && python setup.py install
107 install-logging: LOGGING=logging-0.4.9.2
108 install-logging:
109 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
110 tar -zxf $(LOGGING).tar.gz
111 cd $(LOGGING) && python setup.py install
113 # handy target to upgrade iptables (use rpm or apt-get in preference)
114 install-iptables:
115 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
116 tar -jxf iptables-1.2.11.tar.bz2
117 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
119 install-%: DESTDIR=
120 install-%: %
121 @: # do nothing
123 help:
124 @echo 'Installation targets:'
125 @echo ' install - build and install everything'
126 @echo ' install-xen - build and install the Xen hypervisor'
127 @echo ' install-tools - build and install the control tools'
128 @echo ' install-kernels - build and install guest kernels'
129 @echo ' install-docs - build and install documentation'
130 @echo ''
131 @echo 'Building targets:'
132 @echo ' dist - build and install everything into local dist directory'
133 @echo ' world - clean everything, delete guest kernel build'
134 @echo ' trees then make dist'
135 @echo ' xen - build and install Xen hypervisor'
136 @echo ' tools - build and install tools'
137 @echo ' kernels - build and install guest kernels'
138 @echo ' kbuild - synonym for make kernels'
139 @echo ' docs - build and install docs'
140 @echo ''
141 @echo 'Cleaning targets:'
142 @echo ' clean - clean the Xen, tools and docs (but not'
143 @echo ' guest kernel) trees'
144 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
145 @echo ' build trees'
146 @echo ' kdelete - delete guest kernel build trees'
147 @echo ' kclean - clean guest kernel build trees'
148 @echo ''
149 @echo 'Dependency installation targets:'
150 @echo ' install-twisted - install the Twisted Matrix Framework'
151 @echo ' install-logging - install the Python Logging package'
152 @echo ' install-iptables - install iptables tools'
153 @echo ''
154 @echo 'Miscellaneous targets:'
155 @echo ' mkpatches - make patches against vanilla kernels from'
156 @echo ' sparse trees'
157 @echo ' uninstall - attempt to remove installed Xen tools (use'
158 @echo ' with extreme care!)'
160 # Use this target with extreme care!
161 uninstall: DESTDIR=
162 uninstall: D=$(DESTDIR)
163 uninstall:
164 [ ! -d $(D)/etc/xen ] || mv -f $(D)/etc/xen $(D)/etc/xen.old
165 rm -rf $(D)/etc/init.d/xend*
166 rm -rf $(D)/usr/$(LIBDIR)/libxc* $(D)/usr/$(LIBDIR)/libxutil*
167 rm -rf $(D)/usr/lib/python/xen $(D)/usr/include/xen
168 rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
169 rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
170 rm -rf $(D)/usr/sbin/netfix
171 rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm $(D)/var/lib/xen
172 rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace*
173 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm
174 rm -rf $(D)/boot/*xen*
175 rm -rf $(D)/lib/modules/*xen*
177 # Legacy targets for compatibility
178 linux24:
179 $(MAKE) linux-2.4-xen0-build
180 $(MAKE) linux-2.4-xenU-build
182 linux26:
183 $(MAKE) linux-2.6-xen0-build
184 $(MAKE) linux-2.6-xenU-build
186 netbsd20:
187 $(MAKE) netbsd-2.0-xenU-build