ia64/xen-unstable

view Makefile @ 2897:a96369f318e2

bitkeeper revision 1.1159.1.379 (418aab99Wn-Nf0rQewcMcjxDyG3ZXg)

trivial cleanup
author iap10@labyrinth.cl.cam.ac.uk
date Thu Nov 04 22:22:17 2004 +0000 (2004-11-04)
parents 622f60f46a5a
children 796eb5765fcc
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 DIST_DIR ?= $(shell pwd)/dist
6 INSTALL_DIR ?= $(DIST_DIR)/install
8 SOURCEFORGE_MIRROR := http://heanet.dl.sourceforge.net/sourceforge
9 #http://voxel.dl.sourceforge.net/sourceforge/
10 #http://easynews.dl.sourceforge.net/sourceforge
12 #KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU mk.linux-2.4-xen0 mk.linux-2.4-xenU mk.netbsd-2.0-xenU
13 KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.6-xenU
15 ALLKERNELS = $(patsubst buildconfigs/%,%,$(wildcard buildconfigs/mk.*))
16 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
18 export INSTALL_DIR SOURCEFORGE_MIRROR
20 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
21 .PHONY: kbuild kdelete kclean
23 all: dist
25 # build and install everything into local dist directory
26 dist: xen tools kernels docs
27 install -m0644 ./COPYING $(DIST_DIR)
28 install -m0644 ./README $(DIST_DIR)
29 install -m0755 ./install.sh $(DIST_DIR)
30 mkdir -p $(DIST_DIR)/check
31 install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
33 # install everything into the standard system directories
34 # NB: install explicitly does not check that everything is up to date!
35 install:
36 $(MAKE) -C xen install
37 $(MAKE) -C tools install
38 $(shell cp -a install/boot/* /boot/)
39 $(shell cp -a install/lib/modules/* /lib/modules/)
40 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
41 $(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
42 $(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
44 xen:
45 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
47 tools:
48 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
50 # Build all the various kernels and modules
51 kernels:
52 for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i build ; done
54 docs:
55 sh ./docs/check_pkgs && \
56 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
58 kbuild: kernels
60 # Delete the kernel build trees entirely
61 kdelete:
62 for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
64 # Clean the kernel build trees
65 kclean:
66 for i in $(KERNELS) ; do $(MAKE) -f buildconfigs/$$i clean ; done
68 # Make patches from kernel sparse trees
69 mkpatches:
70 for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-xen.patch ; done
73 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
74 # and place them in the install directory. 'make install' should then
75 # copy them to the normal system directories
76 world:
77 $(MAKE) clean
78 $(MAKE) kdelete
79 $(MAKE) dist
81 # clean doesn't do a kclean
82 clean:
83 $(MAKE) -C xen clean
84 $(MAKE) -C tools clean
85 $(MAKE) -C docs clean
87 # clean, but blow away kernel build tree plus tar balls
88 mrproper: clean
89 rm -rf dist patches
90 for i in $(ALLKERNELS) ; do $(MAKE) -f buildconfigs/$$i delete ; done
91 for i in $(ALLSPARSETREES) ; do $(MAKE) -f buildconfigs/Rules.mk $$i-mrproper ; done
93 install-twisted:
94 wget http://www.twistedmatrix.com/products/get-current.epy
95 tar -zxf Twisted-*.tar.gz
96 ( cd Twisted-* ; python setup.py install )
98 install-logging: LOGGING=logging-0.4.9.2
99 install-logging:
100 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
101 tar -zxf $(LOGGING).tar.gz
102 ( cd $(LOGGING) && python setup.py install )
104 # handy target to upgrade iptables (use rpm or apt-get in preference)
105 install-iptables:
106 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
107 tar -jxf iptables-*.tar.bz2
108 ( cd iptables-* ; \
109 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
111 # Use this target with extreme care!
112 uninstall:
113 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
114 rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
116 # Legacy target for compatibility
117 linux24:
118 $(MAKE) -f buildconfigs/mk.linux-2.4-xen0 build
119 $(MAKE) -f buildconfigs/mk.linux-2.4-xenU build
121 # Legacy target for compatibility
122 linux26:
123 $(MAKE) -f buildconfigs/mk.linux-2.6-xen0 build
124 $(MAKE) -f buildconfigs/mk.linux-2.6-xenU build
126 # Legacy target for compatibility
127 netbsd20:
128 $(MAKE) -f buildconfigs/mk.netbsd-2.0-xenU build