original comment: +Wilson03172004,marked due to this pci host does not support MWI
[linux-2.4.git] / arch / ppc / Makefile
1 #
2 # This file is included by the global makefile so that you can add your own
3 # architecture-specific flags and dependencies. Remember to do have actions
4 # for "archclean" and "archdep" for cleaning up and making dependencies for
5 # this architecture
6 #
7 # This file is subject to the terms and conditions of the GNU General Public
8 # License.  See the file "COPYING" in the main directory of this archive
9 # for more details.
10 #
11 # Copyright (C) 1994 by Linus Torvalds
12 # Changes for PPC by Gary Thomas
13 # Rewritten by Cort Dougan and Paul Mackerras
14 #
15
16 # Be sure to change PAGE_OFFSET in include/asm-ppc/page.h to match
17 KERNELLOAD      =$(CONFIG_KERNEL_START)
18
19 LINKFLAGS       = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
20 CPPFLAGS        := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
21 AFLAGS          := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
22 CFLAGS          := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \
23                 -msoft-float -pipe -ffixed-r2 -Wno-uninitialized \
24                 -mmultiple -mstring
25 HOSTCFLAGS      += -I$(TOPDIR)/arch/$(ARCH)
26 CPP             = $(CC) -E $(CFLAGS)
27
28 ifdef CONFIG_4xx
29 CFLAGS := $(CFLAGS) -Wa,-m405
30 endif
31
32 ifdef CONFIG_8xx
33 CFLAGS := $(CFLAGS) -mcpu=860
34 endif
35
36 ifdef CONFIG_PPC64BRIDGE
37 CFLAGS := $(CFLAGS) -Wa,-mppc64bridge
38 endif
39
40 ifdef CONFIG_MORE_COMPILE_OPTIONS
41 # Use sed to remove the quotes.
42   CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
43 endif
44
45 HEAD-y                  := arch/ppc/kernel/head.o
46 HEAD-$(CONFIG_40x)      := arch/ppc/kernel/head_4xx.o
47 HEAD-$(CONFIG_44x)      := arch/ppc/kernel/head_44x.o
48 HEAD-$(CONFIG_8xx)      := arch/ppc/kernel/head_8xx.o
49 HEAD-$(CONFIG_6xx)      += arch/ppc/kernel/idle_6xx.o
50
51 HEAD := $(HEAD-y)
52
53 ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/platforms arch/ppc/mm arch/ppc/lib
54 SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS)
55 CORE_FILES := arch/ppc/kernel/kernel.o arch/ppc/platforms/platform.o \
56         arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(CORE_FILES)
57
58 ifdef CONFIG_MATH_EMULATION
59 SUBDIRS += arch/ppc/math-emu
60 CORE_FILES += arch/ppc/math-emu/math-emu.o
61 endif
62
63 ifdef CONFIG_XMON
64 SUBDIRS += arch/ppc/xmon
65 CORE_FILES += arch/ppc/xmon/x.o
66 endif
67
68 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
69
70 ifdef CONFIG_8xx
71 SUBDIRS += arch/ppc/8xx_io
72 DRIVERS += arch/ppc/8xx_io/8xx_io.o
73 endif
74
75 ifdef CONFIG_CPM2
76 SUBDIRS += arch/ppc/cpm2_io
77 DRIVERS += arch/ppc/cpm2_io/cpm2_io.o
78 endif
79
80 ifdef CONFIG_APUS
81 SUBDIRS += arch/ppc/amiga
82 CORE_FILES += arch/ppc/amiga/amiga.o
83 endif
84
85 checks:
86         @$(MAKE) -C arch/$(ARCH)/kernel checks
87
88 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd uImage
89
90 # All the instructions talk about "make bzImage".
91 bzImage: zImage
92
93 $(BOOT_TARGETS): vmlinux
94         @$(MAKEBOOT) $@
95
96 %_config: arch/ppc/configs/%_defconfig
97         rm -f .config arch/ppc/defconfig
98         cp -f arch/ppc/configs/$(@:config=defconfig) arch/ppc/defconfig
99
100 archclean:
101         rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
102         @$(MAKEBOOT) clean
103
104 archmrproper:
105
106 archdep: scripts/mkdep
107         $(MAKEBOOT) fastdep