ia64/xen-unstable

view Makefile @ 2391:61f948e59214

bitkeeper revision 1.1159.53.25 (4133b18fZ5FTt-fwTtgweJYFwIKErw)

Remove redundant multicall_op from libxc.
author kaf24@freefall.cl.cam.ac.uk
date Mon Aug 30 23:00:31 2004 +0000 (2004-08-30)
parents f44ac9dd7576
children 631de0f7529b
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 INSTALL_DIR ?= $(shell pwd)/install
7 SOURCEFORGE_MIRROR := http://heanet.dl.sourceforge.net/sourceforge
8 #http://voxel.dl.sourceforge.net/sourceforge/
9 #http://easynews.dl.sourceforge.net/sourceforge
11 .PHONY: docs delete-symlinks clean
13 # a not partcularly useful but safe default target
14 all: make-symlinks
15 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
16 $(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
18 # install everything into the standard system directories
19 install: dist
20 $(MAKE) -C xen install
21 $(MAKE) -C tools install
22 $(shell cp -a install/boot/*$(LINUX_VER)* /boot/)
23 $(shell cp -a install/lib/modules/* /lib/modules/)
25 # install xen and tools into the install directory
26 dist: all
27 $(MAKE) linux-xenU
28 $(MAKE) linux-xen0
30 LINUX_RELEASE ?= 2.6
31 LINUX_VER ?= $(shell ( /bin/ls -ld linux-$(LINUX_RELEASE).*-xen-sparse ) 2>/dev/null | \
32 sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
33 LINUX26_VER ?= $(shell ( /bin/ls -ld linux-2.6.*-xen-sparse ) 2>/dev/null | \
34 sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
35 LINUX_CONFIG_DIR ?= $(INSTALL_DIR)/boot
36 LINUX_SRC_PATH ?= .:..
37 LINUX_SRC ?= $(firstword $(foreach dir,$(subst :, ,$(LINUX_SRC_PATH)),\
38 $(wildcard $(dir)/linux-$(LINUX_VER).tar.*z*)))
40 # search for a pristine kernel tar ball, or try downloading one
41 pristine-linux-src:
42 ifeq ($(LINUX_SRC),)
43 @echo "Cannot find linux-$(LINUX_VER).tar.gz in path $(LINUX_SRC_PATH)"
44 @wget http://www.kernel.org/pub/linux/kernel/v$(LINUX_RELEASE)/linux-$(LINUX_VER).tar.bz2 -O./linux-$(LINUX_VER).tar.bz2
45 LINUX_SRC := ./linux-$(LINUX_VER).tar.bz2
46 endif
48 patches/ebtables.diff:
49 mkdir -p patches
50 #wget $(SOURCEFORGE_MIRROR)/ebtables/ebtables-brnf-5_vs_2.4.25.diff.gz \
51 -O- | gunzip -c > $@
52 wget http://www.cl.cam.ac.uk/netos/xen/downloads/ebtables-brnf-5_vs_2.4.27.diff.gz -O- | gunzip -c > $@
54 LINUX_TREES := linux-$(LINUX_VER)-xen0 linux-$(LINUX_VER)-xenU
56 # make a linux-xen build tree from a pristine kernel plus sparse tree
57 ifeq ($(LINUX_RELEASE),2.4)
58 mk-linux-trees: patches/ebtables.diff pristine-linux-src
59 $(RM) -rf $(LINUX_TREES)
60 echo $(LINUX_SRC) | grep -q bz2 && \
61 tar -jxf $(LINUX_SRC) || tar -zxf $(LINUX_SRC)
62 mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xen0
63 ( cd linux-$(LINUX_VER)-xen-sparse ; \
64 ./mkbuildtree ../linux-$(LINUX_VER)-xen0 )
65 cp -al linux-$(LINUX_VER)-xen0 linux-$(LINUX_VER)-xenU
66 ( cd linux-$(LINUX_VER)-xen0 ; \
67 patch -p1 -F3 < ../patches/ebtables.diff )
68 else
69 mk-linux-trees: pristine-linux-src
70 $(RM) -rf $(LINUX_TREES)
71 echo $(LINUX_SRC) | grep -q bz2 && \
72 tar -jxf $(LINUX_SRC) || tar -zxf $(LINUX_SRC)
73 mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xen0
74 ( cd linux-$(LINUX_VER)-xen-sparse ; \
75 ./mkbuildtree ../linux-$(LINUX_VER)-xen0 )
76 cp -al linux-$(LINUX_VER)-xen0 linux-$(LINUX_VER)-xenU
77 endif
79 # configure the specified linux tree
80 CDIR = $(subst config-,linux-$(LINUX_VER)-,$@)
81 ifeq ($(LINUX_RELEASE),2.4)
82 config-xen%:
83 $(MAKE) -C $(CDIR) ARCH=xen mrproper
84 cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) \
85 $(CDIR)/.config || \
86 $(MAKE) -C $(CDIR) ARCH=xen $(subst config-,,$@)_config
87 $(MAKE) -C $(CDIR) ARCH=xen oldconfig
88 $(MAKE) -C $(CDIR) ARCH=xen dep
89 else
90 config-xen%:
91 $(MAKE) -C $(CDIR) ARCH=xen mrproper
92 @[ -e $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) ] \
93 && cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config-,,$@) \
94 $(CDIR)/.config || \
95 $(MAKE) -C $(CDIR) ARCH=xen $(subst config-,,$@)_defconfig
96 endif
98 # build the specified linux tree
99 BDIR = $(subst linux-,linux-$(LINUX_VER)-,$@)
100 linux-xen%:
101 $(MAKE) -C $(BDIR) ARCH=xen modules
102 $(MAKE) -C $(BDIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) \
103 modules_install
104 $(MAKE) -C $(BDIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
106 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
107 # and place them in the install directory. 'make install' should then
108 # copy them to the normal system directories
109 world:
110 $(MAKE) clean
111 $(MAKE) all
112 $(MAKE) mk-linux-trees
113 $(MAKE) config-xenU
114 $(MAKE) linux-xenU
115 $(MAKE) config-xen0
116 $(MAKE) linux-xen0
117 $(MAKE) docs
119 linux26:
120 $(MAKE) LINUX_RELEASE=2.6 mk-linux-trees
121 $(MAKE) LINUX_RELEASE=2.6 config-xenU
122 $(MAKE) LINUX_RELEASE=2.6 linux-xenU
123 $(MAKE) LINUX_RELEASE=2.6 config-xen0
124 $(MAKE) LINUX_RELEASE=2.6 linux-xen0
126 linux24:
127 $(MAKE) LINUX_RELEASE=2.4 mk-linux-trees
128 $(MAKE) LINUX_RELEASE=2.4 config-xenU
129 $(MAKE) LINUX_RELEASE=2.4 linux-xenU
130 $(MAKE) LINUX_RELEASE=2.4 config-xen0
131 $(MAKE) LINUX_RELEASE=2.4 linux-xen0
133 clean: delete-symlinks
134 $(MAKE) -C xen clean
135 $(MAKE) -C tools clean
136 $(MAKE) -C docs clean
138 # clean, but blow away linux build tree plus src tar ball
139 mrproper: clean
140 rm -rf install/* patches $(LINUX_TREES) linux-$(LINUX_VER).tar.*
142 make-symlinks: delete-symlinks
143 ln -sf linux-$(LINUX26_VER)-xen-sparse linux-xen-sparse
145 delete-symlinks:
146 $(RM) linux-xen-sparse
148 # handy target to install twisted (use rpm or apt-get in preference)
149 install-twisted:
150 wget http://www.twistedmatrix.com/products/get-current.epy
151 tar -zxf Twisted-*.tar.gz
152 ( cd Twisted-* ; python setup.py install )
154 install-logging: LOGGING=logging-0.4.9.2
155 install-logging:
156 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
157 tar -zxf $(LOGGING).tar.gz
158 ( cd $(LOGGING) && python setup.py install )
160 # handy target to upgrade iptables (use rpm or apt-get in preference)
161 install-iptables:
162 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
163 tar -jxf iptables-*.tar.bz2
164 ( cd iptables-* ; \
165 make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
167 uninstall:
168 cp -a /etc/xen /etc/xen.old && rm -rf /etc/xen
169 rm -rf "/usr/lib/python2.2/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.2/site-packages/Xc*"
171 docs:
172 $(MAKE) -C docs all || true