This commit was manufactured by cvs2svn to create branch
[linux-2.6.git] / arch / xen / Makefile
1 #
2 # xen/Makefile
3 #
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" cleaning up for this architecture.
7 #
8 # This file is subject to the terms and conditions of the GNU General Public
9 # License.  See the file "COPYING" in the main directory of this archive
10 # for more details.
11 #
12 # Copyright (C) 2004 by Christian Limpach
13 #
14
15 XENARCH := $(subst ",,$(CONFIG_XENARCH))
16
17 # pick up headers from include/asm-xen/asm in preference over include/asm
18 NOSTDINC_FLAGS  = -nostdinc -iwithprefix include/asm-xen -Iinclude/asm-xen -iwithprefix include
19
20 # make uname return the processor arch
21 UTS_MACHINE := $(XENARCH)
22
23 core-y  += arch/xen/kernel/
24
25 include/.asm-ignore: include/asm
26         @rm -f include/.asm-ignore
27         @mv include/asm include/.asm-ignore
28         @echo '  SYMLINK include/asm -> include/asm-$(XENARCH)'
29         $(Q)if [ ! -d include ]; then mkdir -p include; fi;
30         @ln -fsn asm-$(XENARCH) include/asm
31
32 include/asm-xen/asm:
33         @echo '  SYMLINK $@ -> include/asm-xen/asm-$(XENARCH)'
34         @ln -fsn asm-$(XENARCH) $@
35
36 arch/xen/arch:
37         @rm -f $@
38         @ln -fsn $(XENARCH) $@
39
40 prepare: include/.asm-ignore include/asm-xen/asm \
41         arch/xen/arch ;
42
43 all: vmlinuz
44
45 vmlinuz: vmlinux
46         $(Q)$(MAKE) $(build)=arch/xen/boot vmlinuz
47
48 bzImage: vmlinuz
49         $(Q)$(MAKE) $(build)=arch/xen/boot bzImage
50
51 XINSTALL_NAME ?= $(KERNELRELEASE)
52 install: vmlinuz
53         mkdir -p $(INSTALL_PATH)/boot
54         install -m0644 vmlinuz $(INSTALL_PATH)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
55         install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
56         install -m0664 .config $(INSTALL_PATH)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
57         install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
58         mkdir -p $(INSTALL_PATH)/usr/include/xen/linux
59         install -m0644 include/asm-xen/linux-public/*.h $(INSTALL_PATH)/usr/include/xen/linux
60
61 archclean:
62         @if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi;
63         @rm -f arch/xen/arch include/.asm-ignore include/asm-xen/asm
64         @rm -f vmlinux-stripped vmlinuz
65         @rm -f boot/bzImage
66
67 define archhelp
68   echo  '* vmlinuz      - Compressed kernel image'
69   echo  '  install      - Install kernel image and config file'
70 endef
71
72 ifneq ($(XENARCH),)
73 include $(srctree)/arch/xen/$(XENARCH)/Makefile
74 endif