debuggers.hg

view stubdom/Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents de125ae8415d
children
line source
1 XEN_ROOT = ..
2 MINI_OS = $(XEN_ROOT)/extras/mini-os
4 export XEN_OS=MiniOS
6 export stubdom=y
7 export debug=y
8 include $(XEN_ROOT)/Config.mk
10 #ZLIB_URL?=http://www.zlib.net
11 ZLIB_URL=$(XEN_EXTFILES_URL)
12 ZLIB_VERSION=1.2.3
14 #LIBPCI_URL?=http://www.kernel.org/pub/software/utils/pciutils
15 LIBPCI_URL?=$(XEN_EXTFILES_URL)
16 LIBPCI_VERSION=2.2.9
18 #NEWLIB_URL?=ftp://sources.redhat.com/pub/newlib
19 NEWLIB_URL?=$(XEN_EXTFILES_URL)
20 NEWLIB_VERSION=1.16.0
22 #LWIP_URL?=http://download.savannah.gnu.org/releases/lwip
23 LWIP_URL?=$(XEN_EXTFILES_URL)
24 LWIP_VERSION=1.3.0
26 #GRUB_URL?=http://alpha.gnu.org/gnu/grub
27 GRUB_URL?=$(XEN_EXTFILES_URL)
28 GRUB_VERSION=0.97
30 #OCAML_URL?=$(XEN_EXTFILES_URL)
31 OCAML_URL?=http://caml.inria.fr/pub/distrib/ocaml-3.11
32 OCAML_VERSION=3.11.0
34 WGET=wget -c
36 GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH)
37 ifeq ($(XEN_TARGET_ARCH),x86_32)
38 GNU_TARGET_ARCH:=i686
39 endif
41 ifeq ($(GNU_TARGET_ARCH), i686)
42 TARGET_CFLAGS=
43 NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
44 STUBDOM_SUPPORTED=1
45 endif
46 ifeq ($(GNU_TARGET_ARCH), x86_64)
47 TARGET_CFLAGS=-mno-red-zone
48 NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
49 STUBDOM_SUPPORTED=1
50 endif
51 ifeq ($(GNU_TARGET_ARCH), ia64)
52 TARGET_CFLAGS=-mconstant-gp
53 endif
55 CROSS_ROOT=cross-root-$(GNU_TARGET_ARCH)
56 CROSS_PREFIX=$(CURDIR)/$(CROSS_ROOT)
58 # Disable PIE/SSP if GCC supports them. They can break us.
59 TARGET_CFLAGS += $(CFLAGS)
60 TARGET_CPPFLAGS += $(CPPFLAGS)
61 $(call cc-options-add,TARGET_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
63 # Do not use host headers and libs
64 GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p')
65 TARGET_CPPFLAGS += -U __linux__ -U __FreeBSD__ -U __sun__
66 TARGET_CPPFLAGS += -nostdinc
67 TARGET_CPPFLAGS += -isystem $(CURDIR)/$(MINI_OS)/include/posix
68 TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include
69 TARGET_CPPFLAGS += -isystem $(GCC_INSTALL)include
70 TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include
71 TARGET_CPPFLAGS += -isystem $(CURDIR)/lwip-$(XEN_TARGET_ARCH)/src/include/ipv4
72 TARGET_CPPFLAGS += -I$(CURDIR)/include
73 TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include
75 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
77 TARGETS=ioemu c caml grub
79 CROSS_MAKE := $(MAKE) DESTDIR=
81 .PHONY: all
82 all: build
83 ifeq ($(STUBDOM_SUPPORTED),1)
84 build: genpath ioemu-stubdom c-stubdom pv-grub
85 else
86 build: genpath
87 endif
89 STUBDOMPATH="stubdompath.sh"
90 genpath-target = $(call buildmakevars2file,$(STUBDOMPATH))
91 $(eval $(genpath-target))
93 ##############
94 # Cross-newlib
95 ##############
97 newlib-$(NEWLIB_VERSION).tar.gz:
98 $(WGET) $(NEWLIB_URL)/$@
100 newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
101 tar xzf $<
102 patch -d $@ -p0 < newlib.patch
103 patch -d $@ -p0 < newlib-chk.patch
104 patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch
105 find $@ -type f | xargs perl -i.bak \
106 -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
107 touch $@
109 NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
110 .PHONY: cross-newlib
111 cross-newlib: $(NEWLIB_STAMPFILE)
112 $(NEWLIB_STAMPFILE): mk-headers-$(XEN_TARGET_ARCH) newlib-$(NEWLIB_VERSION)
113 mkdir -p newlib-$(XEN_TARGET_ARCH)
114 ( cd newlib-$(XEN_TARGET_ARCH) && \
115 CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \
116 $(CROSS_MAKE) && \
117 $(CROSS_MAKE) install )
119 ############
120 # Cross-zlib
121 ############
123 zlib-$(ZLIB_VERSION).tar.gz:
124 $(WGET) $(ZLIB_URL)/$@
126 zlib-$(XEN_TARGET_ARCH): zlib-$(ZLIB_VERSION).tar.gz
127 tar xzf $<
128 mv zlib-$(ZLIB_VERSION) $@
130 ZLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libz.a
131 .PHONY: cross-zlib
132 cross-zlib: $(ZLIB_STAMPFILE)
133 $(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
134 ( cd $< && \
135 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
136 $(CROSS_MAKE) libz.a && \
137 $(CROSS_MAKE) install )
139 ##############
140 # Cross-libpci
141 ##############
143 pciutils-$(LIBPCI_VERSION).tar.bz2:
144 $(WGET) $(LIBPCI_URL)/$@
146 pciutils-$(XEN_TARGET_ARCH): pciutils-$(LIBPCI_VERSION).tar.bz2
147 tar xjf $<
148 mv pciutils-$(LIBPCI_VERSION) $@
149 patch -d $@ -p1 < pciutils.patch
150 touch $@
152 LIBPCI_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpci.a
153 .PHONY: cross-libpci
154 cross-libpci: $(LIBPCI_STAMPFILE)
155 $(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE)
156 ( cd $< && \
157 cp ../libpci.config.h lib/config.h && \
158 chmod u+w lib/config.h && \
159 echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
160 ln -sf ../../libpci.config.mak lib/config.mk && \
161 $(CROSS_MAKE) CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(realpath $(MINI_OS)/include)" lib/libpci.a && \
162 $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \
163 $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \
164 $(INSTALL_DATA) lib/config.h lib/header.h lib/pci.h lib/types.h $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci/ \
165 )
167 ######
168 # lwIP
169 ######
171 lwip-$(LWIP_VERSION).tar.gz:
172 $(WGET) $(LWIP_URL)/$@
174 lwip-$(XEN_TARGET_ARCH): lwip-$(LWIP_VERSION).tar.gz
175 tar xzf $<
176 mv lwip $@
177 patch -d $@ -p0 < lwip.patch-cvs
178 touch $@
180 #############
181 # Cross-ocaml
182 #############
184 CAMLLIB = $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ocaml
185 OCAML_STAMPFILE=$(CAMLLIB)/.dirstamp
187 ocaml-$(OCAML_VERSION).tar.gz:
188 $(WGET) $(OCAML_URL)/$@
190 ocaml-$(XEN_TARGET_ARCH)/.dirstamp: ocaml-$(OCAML_VERSION).tar.gz ocaml.patch
191 tar xzf $<
192 cd ocaml-$(OCAML_VERSION) && patch -p0 < ../ocaml.patch
193 rm -rf ocaml-$(XEN_TARGET_ARCH)
194 mv ocaml-$(OCAML_VERSION) ocaml-$(XEN_TARGET_ARCH)
195 touch $@
197 MINIOS_HASNOT=IPV6 INET_ATON
199 .PHONY: cross-ocaml
200 cross-ocaml: $(OCAML_STAMPFILE)
201 $(OCAML_STAMPFILE): ocaml-$(XEN_TARGET_ARCH)/.dirstamp
202 cd ocaml-$(XEN_TARGET_ARCH) && ./configure -prefix $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf \
203 -no-pthread -no-shared-libs -no-tk -no-curses \
204 -cc "$(CC) -U_FORTIFY_SOURCE -fno-stack-protector -mno-red-zone"
205 $(foreach i,$(MINIOS_HASNOT),sed -i 's,^\(#define HAS_$(i)\),//\1,' ocaml-$(XEN_TARGET_ARCH)/config/s.h ; )
206 $(CROSS_MAKE) -C ocaml-$(XEN_TARGET_ARCH) world
207 $(CROSS_MAKE) -C ocaml-$(XEN_TARGET_ARCH) opt
208 $(MAKE) -C ocaml-$(XEN_TARGET_ARCH) install
209 touch $@
211 #######
212 # Links
213 #######
215 .PHONY: $(CROSS_ROOT)
216 $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
218 QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
220 ifeq ($(QEMU_ROOT),.)
221 $(XEN_ROOT)/tools/ioemu-dir:
222 $(CROSS_MAKE) -C $(XEN_ROOT)/tools ioemu-dir-find
224 ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir
225 mkdir -p ioemu
226 set -e; \
227 $(absolutify_xen_root); \
228 cd ioemu; \
229 src="$$XEN_ROOT/tools/ioemu-dir"; export src; \
230 (cd $$src && find * -type d -print) | xargs mkdir -p; \
231 (cd $$src && find * ! -type l -type f $(addprefix ! -name , \
232 '*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen \
233 '*.html' '*.pod' \
234 )) | \
235 while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
236 touch ioemu/linkfarm.stamp
237 else
238 export QEMU_ROOT
240 ioemu/linkfarm.stamp:
241 mkdir -p ioemu
242 touch ioemu/linkfarm.stamp
243 endif
245 mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp
246 mkdir -p include/xen && \
247 ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/xen/include/public/*.h)) include/xen && \
248 ln -sf $(addprefix ../../$(XEN_ROOT)/xen/include/public/,arch-ia64 arch-x86 hvm io xsm) include/xen && \
249 ( [ -h include/xen/sys ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen-sys/MiniOS include/xen/sys ) && \
250 ( [ -h include/xen/libelf ] || ln -sf ../../$(XEN_ROOT)/tools/include/xen/libelf include/xen/libelf ) && \
251 mkdir -p include/xen-foreign && \
252 ln -sf $(addprefix ../../,$(wildcard $(XEN_ROOT)/tools/include/xen-foreign/*)) include/xen-foreign/ && \
253 $(CROSS_MAKE) -C include/xen-foreign/ && \
254 ( [ -h include/xen/foreign ] || ln -sf ../xen-foreign include/xen/foreign )
255 mkdir -p libxc-$(XEN_TARGET_ARCH)
256 [ -h libxc-$(XEN_TARGET_ARCH)/Makefile ] || ( cd libxc-$(XEN_TARGET_ARCH) && \
257 ln -sf ../$(XEN_ROOT)/tools/libxc/*.h . && \
258 ln -sf ../$(XEN_ROOT)/tools/libxc/*.c . && \
259 ln -sf ../$(XEN_ROOT)/tools/libxc/Makefile . )
260 mkdir -p libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH)
261 [ -h libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH) ] || ( cd libxc-$(XEN_TARGET_ARCH)/$(XEN_TARGET_ARCH) && \
262 ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.c . && \
263 ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/*.h . && \
264 ln -sf ../$(XEN_ROOT)/tools/libxc/$(XEN_TARGET_ARCH)/Makefile . )
265 $(CROSS_MAKE) -C $(MINI_OS) links
266 touch mk-headers-$(XEN_TARGET_ARCH)
268 TARGETS_MINIOS=$(addprefix mini-os-$(XEN_TARGET_ARCH)-,$(TARGETS))
269 $(TARGETS_MINIOS): mini-os-%:
270 [ -d $@ ] || \
271 for i in $$(cd $(MINI_OS) ; find . -type d) ; do \
272 mkdir -p $@/$$i ; \
273 done
275 #######
276 # libxc
277 #######
279 .PHONY: libxc
280 libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a
281 libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib
282 CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C libxc-$(XEN_TARGET_ARCH)
284 libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a
286 #######
287 # ioemu
288 #######
290 .PHONY: ioemu
291 ioemu: cross-zlib cross-libpci libxc
292 [ -f ioemu/config-host.mak ] || \
293 ( $(absolutify_xen_root); \
294 $(buildmakevars2shellvars); \
295 cd ioemu ; \
296 LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) \
297 TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
298 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
299 TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
300 $(QEMU_ROOT)/xen-setup-stubdom )
301 $(CROSS_MAKE) -C ioemu -f $(QEMU_ROOT)/Makefile
303 ######
304 # caml
305 ######
307 .PHONY: caml
308 caml: $(CROSS_ROOT)
309 CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) OCAMLC_CROSS_PREFIX=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/bin/
311 ###
312 # C
313 ###
315 .PHONY: c
316 c: $(CROSS_ROOT)
317 CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH)
319 ######
320 # Grub
321 ######
323 grub-$(GRUB_VERSION).tar.gz:
324 $(WGET) $(GRUB_URL)/$@
326 grub-upstream: grub-$(GRUB_VERSION).tar.gz
327 tar xzf $<
328 mv grub-$(GRUB_VERSION) $@
329 for i in grub.patches/* ; do \
330 patch -d $@ -p1 < $$i ; \
331 done
333 .PHONY: grub
334 grub: grub-upstream $(CROSS_ROOT)
335 mkdir -p grub-$(XEN_TARGET_ARCH)
336 CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(CROSS_MAKE) -C $@ OBJ_DIR=$(CURDIR)/grub-$(XEN_TARGET_ARCH)
338 ########
339 # minios
340 ########
342 .PHONY: ioemu-stubdom
343 ioemu-stubdom: APP_OBJS=$(CURDIR)/ioemu/i386-stubdom/qemu.a $(CURDIR)/ioemu/i386-stubdom/libqemu.a $(CURDIR)/ioemu/libqemu_common.a
344 ioemu-stubdom: mini-os-$(XEN_TARGET_ARCH)-ioemu lwip-$(XEN_TARGET_ARCH) libxc ioemu
345 DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_QEMU $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(APP_OBJS)"
347 .PHONY: caml-stubdom
348 caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxc cross-ocaml caml
349 DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_CAML $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS="$(CURDIR)/caml/main-caml.o $(CURDIR)/caml/caml.o $(CAMLLIB)/libasmrun.a"
351 .PHONY: c-stubdom
352 c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c
353 DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_C $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a
355 .PHONY: pv-grub
356 pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
357 DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="-DCONFIG_GRUB $(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" $(CROSS_MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
359 #########
360 # install
361 #########
363 ifeq ($(STUBDOM_SUPPORTED),1)
364 install: genpath install-readme install-ioemu install-grub
365 else
366 install: genpath
367 endif
369 install-readme:
370 $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
371 $(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.stubdom
373 install-ioemu: ioemu-stubdom
374 $(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC)"
375 $(INSTALL_PROG) stubdompath.sh stubdom-dm "$(DESTDIR)$(LIBEXEC)"
376 $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
377 $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-ioemu/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/ioemu-stubdom.gz"
379 install-grub: pv-grub
380 $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
381 $(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-grub/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz"
383 #######
384 # clean
385 #######
387 # Only clean the libxc/ioemu/mini-os part
388 .PHONY: clean
389 clean:
390 rm -fr mini-os-$(XEN_TARGET_ARCH)-ioemu
391 rm -fr mini-os-$(XEN_TARGET_ARCH)-c
392 rm -fr mini-os-$(XEN_TARGET_ARCH)-caml
393 rm -fr mini-os-$(XEN_TARGET_ARCH)-grub
394 $(CROSS_MAKE) -C caml clean
395 $(CROSS_MAKE) -C c clean
396 rm -fr grub-$(XEN_TARGET_ARCH)
397 rm -f $(STUBDOMPATH)
398 [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(CROSS_MAKE) -C libxc-$(XEN_TARGET_ARCH) clean
399 -[ ! -d ioemu ] || $(CROSS_MAKE) -C ioemu clean
401 # clean the cross-compilation result
402 .PHONY: crossclean
403 crossclean: clean
404 rm -fr $(CROSS_ROOT)
405 rm -fr newlib-$(XEN_TARGET_ARCH)
406 rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH)
407 rm -fr libxc-$(XEN_TARGET_ARCH) ioemu
408 rm -f mk-headers-$(XEN_TARGET_ARCH)
409 rm -fr ocaml-$(XEN_TARGET_ARCH)
410 rm -fr include
412 # clean patched sources
413 .PHONY: patchclean
414 patchclean: crossclean
415 rm -fr newlib-$(NEWLIB_VERSION)
416 rm -fr lwip-$(XEN_TARGET_ARCH)
417 rm -fr grub-upstream
419 # clean downloads
420 .PHONY: downloadclean
421 downloadclean: patchclean
422 rm -f newlib-$(NEWLIB_VERSION).tar.gz
423 rm -f zlib-$(ZLIB_VERSION).tar.gz
424 rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
425 rm -f grub-$(GRUB_VERSION).tar.gz
426 rm -f lwip-$(LWIP_VERSION).tar.gz
427 rm -f ocaml-$(OCAML_VERSION).tar.gz
429 .PHONY: distclean
430 distclean: downloadclean