direct-io.hg

view Makefile @ 7477:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents 74d56b7ff46c
children 5ee1f7f3fc9b
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
6 # You may use wildcards in the above e.g. KERNELS=*2.6*
8 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
10 # Export target architecture overrides to Xen and Linux sub-trees.
11 ifneq ($(XEN_TARGET_ARCH),)
12 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
13 export XEN_TARGET_ARCH SUBARCH
14 endif
16 # Default target must appear before any include lines
17 all: dist
19 XEN_ROOT=$(CURDIR)
20 include Config.mk
21 include buildconfigs/Rules.mk
23 ifeq ($(XEN_TARGET_X86_PAE),y)
24 export pae=y
25 endif
27 .PHONY: all dist install xen kernels tools dev-docs docs world clean
28 .PHONY: mkpatches mrproper kbuild kdelete kclean
30 # build and install everything into the standard system directories
31 install: install-xen install-kernels install-tools install-docs
33 build: kernels
34 $(MAKE) -C xen build
35 $(MAKE) -C tools build
36 $(MAKE) -C docs build
38 # The test target is for unit tests that can run without an installation. Of
39 # course, many tests require a machine running Xen itself, and these are
40 # handled elsewhere.
41 test:
42 $(MAKE) -C tools/python test
44 # build and install everything into local dist directory
45 dist: DESTDIR=$(DISTDIR)/install
46 dist: dist-xen dist-kernels dist-tools dist-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
52 dist-%: DESTDIR=$(DISTDIR)/install
53 dist-%: install-%
54 @: # do nothing
56 # Legacy dist targets
57 xen: dist-xen
58 tools: dist-tools
59 kernels: dist-kernels
60 docs: dist-docs
62 install-xen:
63 $(MAKE) -C xen install
65 install-tools:
66 $(MAKE) -C tools install
68 install-kernels:
69 for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
71 install-docs:
72 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
74 dev-docs:
75 $(MAKE) -C docs dev-docs
77 # Build all the various kernels and modules
78 kbuild: kernels
80 # Delete the kernel build trees entirely
81 kdelete:
82 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
84 # Clean the kernel build trees
85 kclean:
86 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
88 # Make patches from kernel sparse trees
89 mkpatches:
90 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
92 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
93 # and place them in the install directory. 'make install' should then
94 # copy them to the normal system directories
95 world:
96 $(MAKE) clean
97 $(MAKE) kdelete
98 $(MAKE) dist
100 # clean doesn't do a kclean
101 clean::
102 $(MAKE) -C xen clean
103 $(MAKE) -C tools clean
104 $(MAKE) -C docs clean
106 # clean, but blow away kernel build tree plus tarballs
107 distclean: clean
108 rm -rf dist patches/tmp
109 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
110 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
112 # Linux name for GNU distclean
113 mrproper: distclean
115 install-logging: LOGGING=logging-0.4.9.2
116 install-logging:
117 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
118 tar -zxf $(LOGGING).tar.gz
119 cd $(LOGGING) && python setup.py install
121 # handy target to upgrade iptables (use rpm or apt-get in preference)
122 install-iptables:
123 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
124 tar -jxf iptables-1.2.11.tar.bz2
125 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
127 help:
128 @echo 'Installation targets:'
129 @echo ' install - build and install everything'
130 @echo ' install-xen - build and install the Xen hypervisor'
131 @echo ' install-tools - build and install the control tools'
132 @echo ' install-kernels - build and install guest kernels'
133 @echo ' install-docs - build and install user documentation'
134 @echo ''
135 @echo 'Building targets:'
136 @echo ' dist - build and install everything into local dist directory'
137 @echo ' world - clean everything, delete guest kernel build'
138 @echo ' trees then make dist'
139 @echo ' xen - build and install Xen hypervisor'
140 @echo ' tools - build and install tools'
141 @echo ' kernels - build and install guest kernels'
142 @echo ' kbuild - synonym for make kernels'
143 @echo ' docs - build and install user documentation'
144 @echo ' dev-docs - build developer-only documentation'
145 @echo ''
146 @echo 'Cleaning targets:'
147 @echo ' clean - clean the Xen, tools and docs (but not'
148 @echo ' guest kernel) trees'
149 @echo ' distclean - clean plus delete kernel tarballs and kernel'
150 @echo ' build trees'
151 @echo ' kdelete - delete guest kernel build trees'
152 @echo ' kclean - clean guest kernel build trees'
153 @echo ''
154 @echo 'Dependency installation targets:'
155 @echo ' install-logging - install the Python Logging package'
156 @echo ' install-iptables - install iptables tools'
157 @echo ''
158 @echo 'Miscellaneous targets:'
159 @echo ' mkpatches - make patches against vanilla kernels from'
160 @echo ' sparse trees'
161 @echo ' uninstall - attempt to remove installed Xen tools (use'
162 @echo ' with extreme care!)'
164 # Use this target with extreme care!
165 uninstall: D=$(DESTDIR)
166 uninstall:
167 [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
168 rm -rf $(D)/etc/init.d/xend*
169 rm -rf $(D)/etc/hotplug/xen-backend.agent
170 rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
171 rm -rf $(D)/boot/*xen*
172 rm -rf $(D)/lib/modules/*xen*
173 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/lomount
174 rm -rf $(D)/usr/bin/cpuperf-perfcntr $(D)/usr/bin/cpuperf-xen
175 rm -rf $(D)/usr/bin/xc_shadow
176 rm -rf $(D)/usr/include/xenctrl.h
177 rm -rf $(D)/usr/include/xs_lib.h $(D)/usr/include/xs.h
178 rm -rf $(D)/usr/include/xen
179 rm -rf $(D)/usr/$(LIBDIR)/libxenctrl* $(D)/usr/$(LIBDIR)/libxenguest*
180 rm -rf $(D)/usr/$(LIBDIR)/libxenstore*
181 rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/$(LIBDIR)/xen
182 rm -rf $(D)/usr/$(LIBDIR)/xen/bin
183 rm -rf $(D)/usr/sbin/xen* $(D)/usr/sbin/netfix $(D)/usr/sbin/xm
184 rm -rf $(D)/usr/share/doc/xen
185 rm -rf $(D)/usr/share/xen
186 rm -rf $(D)/usr/share/man/man1/xen*
187 rm -rf $(D)/usr/share/man/man8/xen*
189 # Legacy targets for compatibility
190 linux26:
191 $(MAKE) 'KERNELS=linux-2.6*' kernels