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
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
11 # Copyright (C) 1994 by Linus Torvalds
12 # Changes for PPC by Gary Thomas
13 # Rewritten by Cort Dougan and Paul Mackerras
16 # Be sure to change PAGE_OFFSET in include/asm-ppc/page.h to match
17 KERNELLOAD =$(CONFIG_KERNEL_START)
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 \
25 HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)
26 CPP = $(CC) -E $(CFLAGS)
29 CFLAGS := $(CFLAGS) -Wa,-m405
33 CFLAGS := $(CFLAGS) -mcpu=860
36 ifdef CONFIG_PPC64BRIDGE
37 CFLAGS := $(CFLAGS) -Wa,-mppc64bridge
40 ifdef CONFIG_MORE_COMPILE_OPTIONS
41 # Use sed to remove the quotes.
42 CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
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
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)
58 ifdef CONFIG_MATH_EMULATION
59 SUBDIRS += arch/ppc/math-emu
60 CORE_FILES += arch/ppc/math-emu/math-emu.o
64 SUBDIRS += arch/ppc/xmon
65 CORE_FILES += arch/ppc/xmon/x.o
68 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
71 SUBDIRS += arch/ppc/8xx_io
72 DRIVERS += arch/ppc/8xx_io/8xx_io.o
76 SUBDIRS += arch/ppc/cpm2_io
77 DRIVERS += arch/ppc/cpm2_io/cpm2_io.o
81 SUBDIRS += arch/ppc/amiga
82 CORE_FILES += arch/ppc/amiga/amiga.o
86 @$(MAKE) -C arch/$(ARCH)/kernel checks
88 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd uImage
90 # All the instructions talk about "make bzImage".
93 $(BOOT_TARGETS): vmlinux
96 %_config: arch/ppc/configs/%_defconfig
97 rm -f .config arch/ppc/defconfig
98 cp -f arch/ppc/configs/$(@:config=defconfig) arch/ppc/defconfig
101 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks}
106 archdep: scripts/mkdep