debuggers.hg

view Makefile @ 3632:fec8b1778268

bitkeeper revision 1.1159.212.60 (41febc4bKKSkh9u-Zes9v2CmBuLZxA)

More bootstrap fixes for x86/64. Next thing to do is sort out the IDT and
get traps.c working; then we can get rid of a bunch of dummy labels from
end of boot/x86_64.S. We're also going to need some kind of entry.S before
we can safely enable interrupts. Also bear in mind that not all of physical
RAM may be mapped (only first 1GB) and no m2p table is yet allocated or
mapped. Plenty to be done!
author kaf24@viper.(none)
date Mon Jan 31 23:16:27 2005 +0000 (2005-01-31)
parents 30ee9c427a5b
children
line source
1 #
2 # Grand Unified Makefile for Xen.
3 #
5 # Default is to install to local 'dist' directory.
6 DISTDIR ?= $(CURDIR)/dist
7 DESTDIR ?= $(DISTDIR)/install
9 INSTALL := install
10 INSTALL_DIR := $(INSTALL) -d -m0755
11 INSTALL_DATA := $(INSTALL) -m0644
12 INSTALL_PROG := $(INSTALL) -m0755
14 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
15 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
16 # You may use wildcards in the above e.g. KERNELS=*2.4*
18 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
19 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
20 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
22 export DESTDIR
24 # Export target architecture overrides to Xen and Linux sub-trees.
25 ifneq ($(TARGET_ARCH),)
26 SUBARCH := $(subst x86_32,i386,$(TARGET_ARCH))
27 export TARGET_ARCH SUBARCH
28 endif
30 include buildconfigs/Rules.mk
32 .PHONY: all dist install xen tools kernels docs world clean mkpatches mrproper
33 .PHONY: kbuild kdelete kclean
35 all: dist
37 # build and install everything into the standard system directories
38 install: install-xen install-tools install-kernels install-docs
40 # build and install everything into local dist directory
41 dist: xen tools kernels docs
42 $(INSTALL_DIR) $(DISTDIR)/check
43 $(INSTALL_DATA) ./COPYING $(DISTDIR)
44 $(INSTALL_DATA) ./README $(DISTDIR)
45 $(INSTALL_PROG) ./install.sh $(DISTDIR)
46 $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
48 xen:
49 $(MAKE) -C xen install
51 tools:
52 $(MAKE) -C tools install
54 kernels:
55 for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
57 docs:
58 sh ./docs/check_pkgs && $(MAKE) -C docs install || true
60 # Build all the various kernels and modules
61 kbuild: kernels
63 # Delete the kernel build trees entirely
64 kdelete:
65 for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
67 # Clean the kernel build trees
68 kclean:
69 for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
71 # Make patches from kernel sparse trees
72 mkpatches:
73 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch || exit 1; done
76 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
77 # and place them in the install directory. 'make install' should then
78 # copy them to the normal system directories
79 world:
80 $(MAKE) clean
81 $(MAKE) kdelete
82 $(MAKE) dist
84 # clean doesn't do a kclean
85 clean:
86 $(MAKE) -C xen clean
87 $(MAKE) -C tools clean
88 $(MAKE) -C docs clean
90 # clean, but blow away kernel build tree plus tar balls
91 mrproper: clean
92 rm -rf dist patches/tmp
93 for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
94 for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
96 install-twisted:
97 wget http://www.twistedmatrix.com/products/get-current.epy
98 tar -zxf Twisted-*.tar.gz
99 cd Twisted-* && python setup.py install
101 install-logging: LOGGING=logging-0.4.9.2
102 install-logging:
103 [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
104 tar -zxf $(LOGGING).tar.gz
105 cd $(LOGGING) && python setup.py install
107 # handy target to upgrade iptables (use rpm or apt-get in preference)
108 install-iptables:
109 wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
110 tar -jxf iptables-1.2.11.tar.bz2
111 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
113 install-%: DESTDIR=
114 install-%: %
115 @: # do nothing
117 help:
118 @echo 'Installation targets:'
119 @echo ' install - build and install everything'
120 @echo ' install-xen - build and install the Xen hypervisor'
121 @echo ' install-tools - build and install the control tools'
122 @echo ' install-kernels - build and install guest kernels'
123 @echo ' install-docs - build and install documentation'
124 @echo ''
125 @echo 'Building targets:'
126 @echo ' dist - build and install everything into local dist directory'
127 @echo ' world - clean everything, delete guest kernel build'
128 @echo ' trees then make dist'
129 @echo ' xen - build and install Xen hypervisor'
130 @echo ' tools - build and install tools'
131 @echo ' kernels - build and install guest kernels'
132 @echo ' kbuild - synonym for make kernels'
133 @echo ' docs - build and install docs'
134 @echo ''
135 @echo 'Cleaning targets:'
136 @echo ' clean - clean the Xen, tools and docs (but not'
137 @echo ' guest kernel) trees'
138 @echo ' mrproper - clean plus delete kernel tarballs and kernel'
139 @echo ' build trees'
140 @echo ' kdelete - delete guest kernel build trees'
141 @echo ' kclean - clean guest kernel build trees'
142 @echo ''
143 @echo 'Dependency installation targets:'
144 @echo ' install-twisted - install the Twisted Matrix Framework'
145 @echo ' install-logging - install the Python Logging package'
146 @echo ' install-iptables - install iptables tools'
147 @echo ''
148 @echo 'Miscellaneous targets:'
149 @echo ' mkpatches - make patches against vanilla kernels from'
150 @echo ' sparse trees'
151 @echo ' uninstall - attempt to remove installed Xen tools (use'
152 @echo ' with extreme care!)'
154 # Use this target with extreme care!
155 uninstall: DESTDIR=
156 uninstall: D=$(DESTDIR)
157 uninstall:
158 [ ! -d $(D)/etc/xen ] || mv -f $(D)/etc/xen $(D)/etc/xen.old
159 rm -rf $(D)/etc/init.d/xend*
160 rm -rf $(D)/usr/lib/libxc* $(D)/usr/lib/libxutil*
161 rm -rf $(D)/usr/lib/python/xen $(D)/usr/include/xen
162 rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
163 rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
164 rm -rf $(D)/usr/sbin/netfix
165 rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm $(D)/var/lib/xen
166 rm -rf $(D)/usr/share/doc/xen $(D)/usr/man/man*/xentrace*
167 rm -rf $(D)/usr/bin/xen* $(D)/usr/bin/miniterm
168 rm -rf $(D)/boot/*xen*
170 # Legacy targets for compatibility
171 linux24:
172 $(MAKE) linux-2.4-xen0-build
173 $(MAKE) linux-2.4-xenU-build
175 linux26:
176 $(MAKE) linux-2.6-xen0-build
177 $(MAKE) linux-2.6-xenU-build
179 netbsd20:
180 $(MAKE) netbsd-2.0-xenU-build