ia64/xen-unstable

view Makefile @ 3348:3d7f4ed76300

bitkeeper revision 1.1159.1.514 (41d40931RP9O8KEhD-URrF5kcG5Rlg)

Merge tempest.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into tempest.cl.cam.ac.uk:/local/scratch/smh22/xen-unstable.bk
author smh22@tempest.cl.cam.ac.uk
date Thu Dec 30 13:57:05 2004 +0000 (2004-12-30)
parents fd0d4d8e6193
children 6aadc1c26a93 e17a946c7a91 0451cbfd268d
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 DIST_DIR ?= $(shell pwd)/dist
6 INSTALL_DIR ?= $(DIST_DIR)/install
8 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
9 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
10 # You may use wildcards in the above e.g. KERNELS=*2.4*
12 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
13 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
14 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
17 export INSTALL_DIR
19 include buildconfigs/Rules.mk
21 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
22 .PHONY: kbuild kdelete kclean install-tools install-xen install-docs
23 .PHONY: install-kernels
25 all: dist
27 # install everything into the standard system directories
28 # NB: install explicitly does not check that everything is up to date!
29 install: install-tools install-xen install-kernels install-docs
31 install-xen:
32 $(MAKE) -C xen install
34 install-tools:
35 $(MAKE) -C tools install
37 install-kernels:
38 $(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
39 $(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
40 $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
41 $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
43 install-docs:
44 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
46 # build and install everything into local dist directory
47 dist: xen tools kernels docs
48 install -m0644 ./COPYING $(DIST_DIR)
49 install -m0644 ./README $(DIST_DIR)
50 install -m0755 ./install.sh $(DIST_DIR)
51 mkdir -p $(DIST_DIR)/check
52 install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
54 xen:
55 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
57 tools:
58 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
60 kernels:
61 for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done
63 docs:
64 sh ./docs/check_pkgs && \
65 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
67 # Build all the various kernels and modules
68 kbuild: kernels
70 # Delete the kernel build trees entirely
71 kdelete:
72 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
74 # Clean the kernel build trees
75 kclean:
76 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
78 # Make patches from kernel sparse trees
79 mkpatches:
80 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
83 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
84 # and place them in the install directory. 'make install' should then
85 # copy them to the normal system directories
86 world:
87 $(MAKE) clean
88 $(MAKE) kdelete
89 $(MAKE) dist
91 # clean doesn't do a kclean
92 clean:
93 $(MAKE) -C xen clean
94 $(MAKE) -C tools clean
95 $(MAKE) -C docs clean
97 # clean, but blow away kernel build tree plus tar balls
98 mrproper: clean
99 rm -rf dist patches/tmp
100 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
101 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
103 install-twisted:
104 wget http://www.twistedmatrix.com/products/get-current.epy
105 tar -zxf Twisted-*.tar.gz
106 ( cd Twisted-* ; python setup.py install )
108 install-logging: LOGGING=logging-0.4.9.2
109 install-logging:
110 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
111 tar -zxf $(LOGGING).tar.gz
112 ( cd $(LOGGING) && python setup.py install )
114 # handy target to upgrade iptables (use rpm or apt-get in preference)
115 install-iptables:
116 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
117 tar -jxf iptables-*.tar.bz2
118 ( cd iptables-* ; \
119 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
121 # Use this target with extreme care!
122 uninstall:
123 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
124 rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
126 # Legacy targets for compatibility
127 linux24:
128 $(MAKE) linux-2.4-xen0-build
129 $(MAKE) linux-2.4-xenU-build
131 linux26:
132 $(MAKE) linux-2.6-xen0-build
133 $(MAKE) linux-2.6-xenU-build
135 netbsd20:
136 $(MAKE) netbsd-2.0-xenU-build