ia64/xen-unstable

view linux-2.4.27-xen-sparse/arch/xen/Makefile @ 2621:9402048e2325

bitkeeper revision 1.1159.1.218 (416a8128OiHXHyk_Sy8FsA0YUQcEnA)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xeno.bk-26dom0
into freefall.cl.cam.ac.uk:/local/scratch/cl349/xeno.bk-26dom0
author cl349@freefall.cl.cam.ac.uk
date Mon Oct 11 12:48:40 2004 +0000 (2004-10-11)
parents 869c20f2977b
children 2c4a115fcca1
line source
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" and "archdep" for cleaning up and making dependencies for
7 # this architecture
8 #
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License. See the file "COPYING" in the main directory of this archive
11 # for more details.
12 #
13 # Copyright (C) 1994 by Linus Torvalds
14 #
15 # 19990713 Artur Skawina <skawina@geocities.com>
16 # Added '-march' and '-mpreferred-stack-boundary' support
17 #
19 override EXTRAVERSION:=$(subst linux-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL),,$(shell basename $(TOPDIR)))$(EXTRAVERSION)
21 # If no .config file exists then use the appropriate defconfig-* file
22 ifneq (.config,$(wildcard .config))
23 DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
24 -include $(TOPDIR)/.config
25 endif
27 LD=$(CROSS_COMPILE)ld -m elf_i386
28 OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
29 LDFLAGS=-e stext
30 LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
32 CFLAGS += -pipe
34 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
36 # prevent gcc from keeping the stack 16 byte aligned
37 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
39 ifdef CONFIG_M686
40 CFLAGS += -march=i686
41 endif
43 ifdef CONFIG_MPENTIUMIII
44 CFLAGS += -march=i686
45 endif
47 ifdef CONFIG_MPENTIUM4
48 CFLAGS += -march=i686
49 endif
51 ifdef CONFIG_MK7
52 CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
53 endif
55 HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
57 SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
58 SUBDIRS += arch/xen/drivers/console
59 SUBDIRS += arch/xen/drivers/evtchn
60 SUBDIRS += arch/xen/drivers/blkif
61 SUBDIRS += arch/xen/drivers/netif
62 SUBDIRS += arch/xen/drivers/balloon
63 ifdef CONFIG_XEN_PRIVILEGED_GUEST
64 SUBDIRS += arch/xen/drivers/dom0
65 endif
67 CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
68 CORE_FILES += arch/xen/drivers/evtchn/drv.o
69 CORE_FILES += arch/xen/drivers/console/drv.o
70 DRIVERS += arch/xen/drivers/blkif/drv.o
71 DRIVERS += arch/xen/drivers/netif/drv.o
72 ifdef CONFIG_XEN_PRIVILEGED_GUEST
73 CORE_FILES += arch/xen/drivers/dom0/drv.o
74 endif
75 CORE_FILES += arch/xen/drivers/balloon/drv.o
76 LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
78 arch/xen/kernel: dummy
79 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
81 arch/xen/mm: dummy
82 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
84 arch/xen/drivers/console: dummy
85 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
87 arch/xen/drivers/network: dummy
88 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
90 arch/xen/drivers/block: dummy
91 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
93 arch/xen/drivers/dom0: dummy
94 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
96 arch/xen/drivers/balloon: dummy
97 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
99 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
101 vmlinux: arch/xen/vmlinux.lds
103 FORCE: ;
105 .PHONY: bzImage compressed clean archclean archmrproper archdep
108 bzImage: vmlinux
109 @$(MAKEBOOT) bzImage
111 INSTALL_NAME ?= $(KERNELRELEASE)
112 install: bzImage
113 mkdir -p $(INSTALL_PATH)/boot
114 install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
115 install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
116 install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
117 install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
119 dist:
120 $(MAKE) INSTALL_PATH=../install install
122 %_config: arch/xen/defconfig-%
123 rm -f .config arch/xen/defconfig
124 cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
125 cp -f arch/xen/defconfig-$(@:_config=) .config
128 archclean:
129 @$(MAKEBOOT) clean
131 archmrproper:
132 rm -f include/asm-xen/hypervisor-ifs/arch
134 archdep:
135 @$(MAKEBOOT) dep