ia64/xen-unstable

view linux-2.4-xen-sparse/arch/xen/Makefile @ 6002:565cec5b9cc2

merge?
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 02 23:13:50 2005 +0000 (2005-08-02)
parents 0db6a59abb95 0d69d2ce73e9
children d4fd332df775 04dfb5158f3a f294acb25858
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 # If no .config file exists then use the appropriate defconfig-* file
20 ifneq (.config,$(wildcard .config))
21 DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
22 -include $(TOPDIR)/.config
23 endif
25 LD=$(CROSS_COMPILE)ld -m elf_i386
26 OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
27 LDFLAGS=-e stext
28 LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
30 CFLAGS += -pipe
32 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
34 # prevent gcc from keeping the stack 16 byte aligned
35 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
37 ifdef CONFIG_M686
38 CFLAGS += -march=i686
39 endif
41 ifdef CONFIG_MPENTIUMIII
42 CFLAGS += -march=i686
43 endif
45 ifdef CONFIG_MPENTIUM4
46 CFLAGS += -march=i686
47 endif
49 ifdef CONFIG_MK7
50 CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
51 endif
53 # Disable unit-at-a-time mode, it makes gcc use a lot more stack
54 # due to the lack of sharing of stacklots.
55 CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
57 HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
59 SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
60 SUBDIRS += arch/xen/drivers/console
61 SUBDIRS += arch/xen/drivers/evtchn
62 SUBDIRS += arch/xen/drivers/blkif
63 SUBDIRS += arch/xen/drivers/netif
64 SUBDIRS += arch/xen/drivers/balloon
65 ifdef CONFIG_XEN_PRIVILEGED_GUEST
66 SUBDIRS += arch/xen/drivers/dom0
67 endif
69 CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
70 CORE_FILES += arch/xen/drivers/evtchn/drv.o
71 CORE_FILES += arch/xen/drivers/console/drv.o
72 DRIVERS += arch/xen/drivers/blkif/drv.o
73 DRIVERS += arch/xen/drivers/netif/drv.o
74 ifdef CONFIG_XEN_PRIVILEGED_GUEST
75 CORE_FILES += arch/xen/drivers/dom0/drv.o
76 endif
77 CORE_FILES += arch/xen/drivers/balloon/drv.o
78 LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
80 arch/xen/kernel: dummy
81 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
83 arch/xen/mm: dummy
84 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
86 arch/xen/drivers/console: dummy
87 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
89 arch/xen/drivers/network: dummy
90 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
92 arch/xen/drivers/block: dummy
93 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
95 arch/xen/drivers/dom0: dummy
96 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
98 arch/xen/drivers/balloon: dummy
99 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
101 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
103 vmlinux: arch/xen/vmlinux.lds
105 FORCE: ;
107 .PHONY: bzImage compressed clean archclean archmrproper archdep
110 bzImage: vmlinux
111 @$(MAKEBOOT) bzImage
113 INSTALL_NAME ?= $(KERNELRELEASE)
114 install: bzImage
115 mkdir -p $(INSTALL_PATH)/boot
116 ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
117 rm -f $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
118 install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
119 install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
120 install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
121 install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
122 ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
124 %_config: arch/xen/defconfig-%
125 rm -f .config arch/xen/defconfig
126 cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
127 cp -f arch/xen/defconfig-$(@:_config=) .config
130 archclean:
131 @$(MAKEBOOT) clean
133 archmrproper:
134 rm -f include/asm-xen/xen-public/arch
136 archdep:
137 @$(MAKEBOOT) dep