ia64/xen-unstable

view Makefile @ 3660:f9b3b23cf5ff

bitkeeper revision 1.1159.223.66 (42048ef5frMFQFFm-sKDC6PrU8yraQ)

Name: pic-lib.patch
Description: support PIC code generation
Libraries have 2 methods of being compiled; a .so must contain non-pic
objects, while the .a can contain standard objects.
Signed-off-by: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Feb 05 09:16:37 2005 +0000 (2005-02-05)
parents 308203ddc173
children 2e60786262c4 3ee85723a341 a0be5e5a1f37
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