ia64/xen-unstable

view Makefile @ 4148:ce88c0b8cb9c

bitkeeper revision 1.1236.34.1 (4236a41axFD_nz4Avu26J6WLiOHu7w)

Fix descriptor checking that I broke. Allow conforming code segments -
they are harmless.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Mar 15 09:00:10 2005 +0000 (2005-03-15)
parents 508b288d20e2
children f234096eb41e
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 buildconfigs/Rules.mk
32 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
33 .PHONY: kbuild kdelete kclean
35 all: dist
37 # build and install everything into the standard system directories
38 install: install-xen install-tools install-kernels install-docs
40 build: kernels
41 $(MAKE) -C xen build
42 $(MAKE) -C tools build
43 $(MAKE) -C docs build
45 # build and install everything into local dist directory
46 dist: xen tools kernels docs
47 $(INSTALL_DIR) $(DISTDIR)/check
48 $(INSTALL_DATA) ./COPYING $(DISTDIR)
49 $(INSTALL_DATA) ./README $(DISTDIR)
50 $(INSTALL_PROG) ./install.sh $(DISTDIR)
51 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
53 xen:
54 $(MAKE) -C xen install
56 tools:
57 $(MAKE) -C tools install
59 kernels:
60 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
62 docs:
63 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
65 # Build all the various kernels and modules
66 kbuild: kernels
68 # Delete the kernel build trees entirely
69 kdelete:
70 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
72 # Clean the kernel build trees
73 kclean:
74 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
76 # Make patches from kernel sparse trees
77 mkpatches:
78 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch || exit 1; done
81 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
82 # and place them in the install directory. 'make install' should then
83 # copy them to the normal system directories
84 world:
85 $(MAKE) clean
86 $(MAKE) kdelete
87 $(MAKE) dist
89 # clean doesn't do a kclean
90 clean:
91 $(MAKE) -C xen clean
92 $(MAKE) -C tools clean
93 $(MAKE) -C docs clean
95 # clean, but blow away kernel build tree plus tar balls
96 mrproper: clean
97 rm -rf dist patches/tmp
98 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
99 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
101 install-twisted:
102 wget http://www.twistedmatrix.com/products/get-current.epy
103 tar -zxf Twisted-*.tar.gz
104 cd Twisted-* && python setup.py install
106 install-logging: LOGGING=logging-0.4.9.2
107 install-logging:
108 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
109 tar -zxf $(LOGGING).tar.gz
110 cd $(LOGGING) && python setup.py install
112 # handy target to upgrade iptables (use rpm or apt-get in preference)
113 install-iptables:
114 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
115 tar -jxf iptables-1.2.11.tar.bz2
116 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
118 install-%: DESTDIR=
119 install-%: %
120 @: # do nothing
122 help:
123 @echo 'Installation targets:'
124 @echo ' install - build and install everything'
125 @echo ' install-xen - build and install the Xen hypervisor'
126 @echo ' install-tools - build and install the control tools'
127 @echo ' install-kernels - build and install guest kernels'
128 @echo ' install-docs - build and install documentation'
129 @echo ''
130 @echo 'Building targets:'
131 @echo ' dist - build and install everything into local dist directory'
132 @echo ' world - clean everything, delete guest kernel build'
133 @echo ' trees then make dist'
134 @echo ' xen - build and install Xen hypervisor'
135 @echo ' tools - build and install tools'
136 @echo ' kernels - build and install guest kernels'
137 @echo ' kbuild - synonym for make kernels'
138 @echo ' docs - build and install docs'
139 @echo ''
140 @echo 'Cleaning targets:'
141 @echo ' clean - clean the Xen, tools and docs (but not'
142 @echo ' guest kernel) trees'
143 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
144 @echo ' build trees'
145 @echo ' kdelete - delete guest kernel build trees'
146 @echo ' kclean - clean guest kernel build trees'
147 @echo ''
148 @echo 'Dependency installation targets:'
149 @echo ' install-twisted - install the Twisted Matrix Framework'
150 @echo ' install-logging - install the Python Logging package'
151 @echo ' install-iptables - install iptables tools'
152 @echo ''
153 @echo 'Miscellaneous targets:'
154 @echo ' mkpatches - make patches against vanilla kernels from'
155 @echo ' sparse trees'
156 @echo ' uninstall - attempt to remove installed Xen tools (use'
157 @echo ' with extreme care!)'
159 # Use this target with extreme care!
160 uninstall: DESTDIR=
161 uninstall: D=$(DESTDIR)
162 uninstall:
163 [ ! -d $(D)/etc/xen ] || mv -f $(D)/etc/xen $(D)/etc/xen.old
164 rm -rf $(D)/etc/init.d/xend*
165 rm -rf $(D)/usr/lib/libxc* $(D)/usr/lib/libxutil*
166 rm -rf $(D)/usr/lib/python/xen $(D)/usr/include/xen
167 rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
168 rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
169 rm -rf $(D)/usr/sbin/netfix
170 rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm $(D)/var/lib/xen
171 rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace*
172 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm
173 rm -rf $(D)/boot/*xen*
174 rm -rf $(D)/lib/modules/*xen*
176 # Legacy targets for compatibility
177 linux24:
178 $(MAKE) linux-2.4-xen0-build
179 $(MAKE) linux-2.4-xenU-build
181 linux26:
182 $(MAKE) linux-2.6-xen0-build
183 $(MAKE) linux-2.6-xenU-build
185 netbsd20:
186 $(MAKE) netbsd-2.0-xenU-build