ia64/xen-unstable

view Makefile @ 3017:d0006e7baa9a

bitkeeper revision 1.1159.170.41 (419b5697bEIXHXiSbTxwpjfvjHraWw)

Reassert 2.1-devel after push to 2.0 tree.
author kaf24@freefall.cl.cam.ac.uk
date Wed Nov 17 13:48:07 2004 +0000 (2004-11-17)
parents fd10b3d1ab9a
children f0fe276ae088 f52ac722d9c7 452731aa69b6
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
11 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
12 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
14 export INSTALL_DIR
16 include buildconfigs/Rules.mk
18 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
19 .PHONY: kbuild kdelete kclean
21 all: dist
23 # build and install everything into local dist directory
24 dist: xen tools kernels docs
25 install -m0644 ./COPYING $(DIST_DIR)
26 install -m0644 ./README $(DIST_DIR)
27 install -m0755 ./install.sh $(DIST_DIR)
28 mkdir -p $(DIST_DIR)/check
29 install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
31 # install everything into the standard system directories
32 # NB: install explicitly does not check that everything is up to date!
33 install:
34 $(MAKE) -C xen install
35 $(MAKE) -C tools install
36 $(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
37 $(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
38 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
39 $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
40 $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
42 xen:
43 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
45 tools:
46 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
48 kernels:
49 for i in $(KERNELS) ; do $(MAKE) $$i-build ; done
51 docs:
52 sh ./docs/check_pkgs && \
53 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
55 # Build all the various kernels and modules
56 kbuild: kernels
58 # Delete the kernel build trees entirely
59 kdelete:
60 for i in $(KERNELS) ; do $(MAKE) $$i-delete ; done
62 # Clean the kernel build trees
63 kclean:
64 for i in $(KERNELS) ; do $(MAKE) $$i-clean ; done
66 # Make patches from kernel sparse trees
67 mkpatches:
68 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
71 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
72 # and place them in the install directory. 'make install' should then
73 # copy them to the normal system directories
74 world:
75 $(MAKE) clean
76 $(MAKE) kdelete
77 $(MAKE) dist
79 # clean doesn't do a kclean
80 clean:
81 $(MAKE) -C xen clean
82 $(MAKE) -C tools clean
83 $(MAKE) -C docs clean
85 # clean, but blow away kernel build tree plus tar balls
86 mrproper: clean
87 rm -rf dist patches/tmp
88 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
89 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
91 install-twisted:
92 wget http://www.twistedmatrix.com/products/get-current.epy
93 tar -zxf Twisted-*.tar.gz
94 ( cd Twisted-* ; python setup.py install )
96 install-logging: LOGGING=logging-0.4.9.2
97 install-logging:
98 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
99 tar -zxf $(LOGGING).tar.gz
100 ( cd $(LOGGING) && python setup.py install )
102 # handy target to upgrade iptables (use rpm or apt-get in preference)
103 install-iptables:
104 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
105 tar -jxf iptables-*.tar.bz2
106 ( cd iptables-* ; \
107 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
109 # Use this target with extreme care!
110 uninstall:
111 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
112 rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
114 # Legacy targets for compatibility
115 linux24:
116 $(MAKE) linux-2.4-xen0-build
117 $(MAKE) linux-2.4-xenU-build
119 linux26:
120 $(MAKE) linux-2.6-xen0-build
121 $(MAKE) linux-2.6-xenU-build
123 netbsd20:
124 $(MAKE) netbsd-2.0-xenU-build