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 17KERNELLOAD =$(CONFIG_KERNEL_START) 18 19LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic 20CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH) 21AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH) 22CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \ 23 -msoft-float -pipe -ffixed-r2 -Wno-uninitialized \ 24 -mmultiple -mstring 25HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH) 26CPP = $(CC) -E $(CFLAGS) 27 28ifdef CONFIG_4xx 29CFLAGS := $(CFLAGS) -Wa,-m405 30endif 31 32ifdef CONFIG_8xx 33CFLAGS := $(CFLAGS) -mcpu=860 34endif 35 36ifdef CONFIG_PPC64BRIDGE 37CFLAGS := $(CFLAGS) -Wa,-mppc64bridge 38endif 39 40ifdef CONFIG_MORE_COMPILE_OPTIONS 41# Use sed to remove the quotes. 42 CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 43endif 44 45HEAD-y := arch/ppc/kernel/head.o 46HEAD-$(CONFIG_40x) := arch/ppc/kernel/head_4xx.o 47HEAD-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o 48HEAD-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o 49HEAD-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o 50 51HEAD := $(HEAD-y) 52 53ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/platforms arch/ppc/mm arch/ppc/lib 54SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS) 55CORE_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 58ifdef CONFIG_MATH_EMULATION 59SUBDIRS += arch/ppc/math-emu 60CORE_FILES += arch/ppc/math-emu/math-emu.o 61endif 62 63ifdef CONFIG_XMON 64SUBDIRS += arch/ppc/xmon 65CORE_FILES += arch/ppc/xmon/x.o 66endif 67 68MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 69 70ifdef CONFIG_8xx 71SUBDIRS += arch/ppc/8xx_io 72DRIVERS += arch/ppc/8xx_io/8xx_io.o 73endif 74 75ifdef CONFIG_CPM2 76SUBDIRS += arch/ppc/cpm2_io 77DRIVERS += arch/ppc/cpm2_io/cpm2_io.o 78endif 79 80ifdef CONFIG_APUS 81SUBDIRS += arch/ppc/amiga 82CORE_FILES += arch/ppc/amiga/amiga.o 83endif 84 85checks: 86 @$(MAKE) -C arch/$(ARCH)/kernel checks 87 88BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd uImage 89 90# All the instructions talk about "make bzImage". 91bzImage: 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 100archclean: 101 rm -f arch/ppc/kernel/{mk_defs,ppc_defs.h,find_name,checks} 102 @$(MAKEBOOT) clean 103 104archmrproper: 105 106archdep: scripts/mkdep 107 $(MAKEBOOT) fastdep 108