ia64/xen-unstable

view linux-2.4.26-xen-sparse/arch/xen/Makefile @ 1455:af0e7c294a1a

bitkeeper revision 1.955 (40c95b3fxI_3RQuXLNjRtxdT0w4w6g)

Fix Linux build
author kaf24@scramble.cl.cam.ac.uk
date Fri Jun 11 07:11:59 2004 +0000 (2004-06-11)
parents 5bfc0d01717c
children 6bb0f401f1b2 50df23f1e00d
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 := -xen$(EXTRAVERSION)
21 LD=$(CROSS_COMPILE)ld -m elf_i386
22 OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
23 LDFLAGS=-e stext
24 LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
26 CFLAGS += -pipe
28 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
30 # prevent gcc from keeping the stack 16 byte aligned
31 CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
33 ifdef CONFIG_M686
34 CFLAGS += -march=i686
35 endif
37 ifdef CONFIG_MPENTIUMIII
38 CFLAGS += -march=i686
39 endif
41 ifdef CONFIG_MPENTIUM4
42 CFLAGS += -march=i686
43 endif
45 ifdef CONFIG_MK7
46 CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
47 endif
49 HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
51 SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
52 SUBDIRS += arch/xen/drivers/console
53 SUBDIRS += arch/xen/drivers/evtchn
54 SUBDIRS += arch/xen/drivers/blkif
55 SUBDIRS += arch/xen/drivers/netif
56 SUBDIRS += arch/xen/drivers/balloon
57 ifdef CONFIG_XEN_PRIVILEGED_GUEST
58 SUBDIRS += arch/xen/drivers/dom0
59 endif
61 CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
62 CORE_FILES += arch/xen/drivers/evtchn/drv.o
63 CORE_FILES += arch/xen/drivers/console/drv.o
64 DRIVERS += arch/xen/drivers/blkif/drv.o
65 DRIVERS += arch/xen/drivers/netif/drv.o
66 ifdef CONFIG_XEN_PRIVILEGED_GUEST
67 CORE_FILES += arch/xen/drivers/dom0/drv.o
68 endif
69 CORE_FILES += arch/xen/drivers/balloon/drv.o
70 LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
72 arch/xen/kernel: dummy
73 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
75 arch/xen/mm: dummy
76 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
78 arch/xen/drivers/console: dummy
79 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
81 arch/xen/drivers/network: dummy
82 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
84 arch/xen/drivers/block: dummy
85 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
87 arch/xen/drivers/dom0: dummy
88 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
90 arch/xen/drivers/balloon: dummy
91 $(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
93 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
95 vmlinux: arch/xen/vmlinux.lds
97 FORCE: ;
99 .PHONY: bzImage compressed clean archclean archmrproper archdep
101 bzImage: vmlinux
102 @$(MAKEBOOT) bzImage
104 install: bzImage
105 mkdir -p $(prefix)/boot
106 install -m0644 arch/$(ARCH)/boot/bzImage $(prefix)/boot/vmlinuz-2.4.26-xen
107 install -m0644 vmlinux $(prefix)/boot/vmlinux-syms-2.4.26-xen
109 dist: bzImage
110 mkdir -p ../install/boot
111 install -m0644 arch/$(ARCH)/boot/xenolinux.gz ../install/boot/vmlinuz-2.4.26-xen
112 install -m0644 vmlinux ../install/boot/vmlinux-syms-2.4.26-xen
114 archclean:
115 @$(MAKEBOOT) clean
117 archmrproper:
118 rm -f include/asm-xen/hypervisor-ifs/arch
120 archdep:
121 rm -f include/asm-xen/hypervisor-ifs/arch
122 ( cd include/asm-xen/hypervisor-ifs ; rm -rf arch ; ln -sf arch-x86 arch)
123 @$(MAKEBOOT) dep