This commit was generated by cvs2svn to compensate for changes in r925,
[linux-2.6.git] / arch / xen / i386 / Makefile
1 #
2 # i386/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) 1994 by Linus Torvalds
13 #
14 # 19990713  Artur Skawina <skawina@geocities.com>
15 #           Added '-march' and '-mpreferred-stack-boundary' support
16 #
17
18 XENARCH := $(subst ",,$(CONFIG_XENARCH))
19
20 LDFLAGS         := -m elf_i386
21 LDFLAGS_vmlinux :=
22 CHECK           := $(CHECK) -D__i386__=1
23
24 CFLAGS += -m32
25 AFLAGS += -m32
26
27 CFLAGS += -pipe -msoft-float
28
29 # prevent gcc from keeping the stack 16 byte aligned
30 CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,)
31
32 align := $(cc-option-align)
33 cflags-$(CONFIG_M386)           += -march=i386
34 cflags-$(CONFIG_M486)           += -march=i486
35 cflags-$(CONFIG_M586)           += -march=i586
36 cflags-$(CONFIG_M586TSC)        += -march=i586
37 cflags-$(CONFIG_M586MMX)        += $(call cc-option,-march=pentium-mmx,-march=i586)
38 cflags-$(CONFIG_M686)           += -march=i686
39 cflags-$(CONFIG_MPENTIUMII)     += -march=i686 $(call cc-option,-mtune=pentium2)
40 cflags-$(CONFIG_MPENTIUMIII)    += -march=i686 $(call cc-option,-mtune=pentium3)
41 cflags-$(CONFIG_MPENTIUMM)      += -march=i686 $(call cc-option,-mtune=pentium3)
42 cflags-$(CONFIG_MPENTIUM4)      += -march=i686 $(call cc-option,-mtune=pentium4)
43 cflags-$(CONFIG_MK6)            += -march=k6
44 # Please note, that patches that add -march=athlon-xp and friends are pointless.
45 # They make zero difference whatsosever to performance at this time.
46 cflags-$(CONFIG_MK7)            += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
47 cflags-$(CONFIG_MK8)            += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
48 cflags-$(CONFIG_MCRUSOE)        += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
49 cflags-$(CONFIG_MEFFICEON)      += -march=i686 $(call cc-option,-mtune=pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
50 cflags-$(CONFIG_MWINCHIPC6)     += $(call cc-option,-march=winchip-c6,-march=i586)
51 cflags-$(CONFIG_MWINCHIP2)      += $(call cc-option,-march=winchip2,-march=i586)
52 cflags-$(CONFIG_MWINCHIP3D)     += $(call cc-option,-march=winchip2,-march=i586)
53 cflags-$(CONFIG_MCYRIXIII)      += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
54 cflags-$(CONFIG_MVIAC3_2)       += $(call cc-option,-march=c3-2,-march=i686)
55
56 # AMD Elan support
57 cflags-$(CONFIG_X86_ELAN)       += -march=i486
58
59 # -mregparm=3 works ok on gcc-3.0 and later
60 #
61 GCC_VERSION                     := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
62 cflags-$(CONFIG_REGPARM)        += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
63
64 # Disable unit-at-a-time mode, it makes gcc use a lot more stack
65 # due to the lack of sharing of stacklots.
66 CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
67
68 CFLAGS += $(cflags-y)
69
70 head-y := arch/xen/i386/kernel/head.o arch/xen/i386/kernel/init_task.o
71
72 libs-y                                  += arch/i386/lib/
73 core-y                                  += arch/xen/i386/kernel/ \
74                                            arch/xen/i386/mm/ \
75                                            arch/i386/crypto/
76 # \
77 #                                          arch/xen/$(mcore-y)/
78 drivers-$(CONFIG_MATH_EMULATION)        += arch/i386/math-emu/
79 drivers-$(CONFIG_PCI)                   += arch/xen/i386/pci/
80 # must be linked after kernel/
81 drivers-$(CONFIG_OPROFILE)              += arch/i386/oprofile/
82 drivers-$(CONFIG_PM)                    += arch/i386/power/
83
84 # for clean
85 obj-    += kernel/ mm/ pci/
86 #obj-   += ../../i386/lib/ ../../i386/mm/ 
87 #../../i386/$(mcore-y)/
88 #obj-   += ../../i386/pci/ ../../i386/oprofile/ ../../i386/power/
89
90 xenflags-y += -Iinclude/asm-xen/asm-i386/mach-xen \
91                 -Iinclude/asm-i386/mach-default
92 CFLAGS += $(xenflags-y)
93 AFLAGS += $(xenflags-y)
94
95 prepare: include/asm-$(XENARCH)/asm_offsets.h
96 CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h
97
98 arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \
99         include/linux/version.h include/config/MARKER
100
101 include/asm-$(XENARCH)/asm_offsets.h: arch/$(XENARCH)/kernel/asm-offsets.s
102         $(call filechk,gen-asm-offsets)