1 # BK Id: %F% %I% %G% %U% %#% << 2 # 1 # 3 # This file is included by the global makefile !! 2 # alpha/Makefile 4 # architecture-specific flags and dependencies << 5 # 3 # 6 # This file is subject to the terms and condit 4 # This file is subject to the terms and conditions of the GNU General Public 7 # License. See the file "COPYING" in the main 5 # License. See the file "COPYING" in the main directory of this archive 8 # for more details. 6 # for more details. 9 # 7 # 10 # Copyright (C) 1994 by Linus Torvalds 8 # Copyright (C) 1994 by Linus Torvalds 11 # Modifications for the OpenRISC architecture: << 12 # Copyright (C) 2003 Matjaz Breskvar <phoenix@b << 13 # Copyright (C) 2010-2011 Jonas Bonn <jonas@sou << 14 # 9 # 15 # Based on: << 16 # arch/i386/Makefile << 17 10 18 KBUILD_DEFCONFIG := or1ksim_defconfig !! 11 KBUILD_DEFCONFIG := defconfig 19 12 20 OBJCOPYFLAGS := -O binary -R .note -R .comm !! 13 NM := $(NM) -B 21 LIBGCC := $(shell $(CC) $(KBUILD_CFLA << 22 14 23 KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux !! 15 LDFLAGS_vmlinux := -static -N #-relax 24 KBUILD_CFLAGS += -msfimm -mshftimm !! 16 CHECKFLAGS += -D__alpha__ >> 17 cflags-y := -pipe -mno-fp-regs -ffixed-8 >> 18 cflags-y += $(call cc-option, -fno-jump-tables) 25 19 26 all: vmlinux.bin !! 20 cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4 >> 21 cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5 >> 22 cpuflags-$(CONFIG_ALPHA_EV56) := -mcpu=ev56 >> 23 cpuflags-$(CONFIG_ALPHA_POLARIS) := -mcpu=pca56 >> 24 cpuflags-$(CONFIG_ALPHA_SX164) := -mcpu=pca56 >> 25 cpuflags-$(CONFIG_ALPHA_EV6) := -mcpu=ev6 >> 26 cpuflags-$(CONFIG_ALPHA_EV67) := -mcpu=ev67 >> 27 # If GENERIC, make sure to turn off any instruction set extensions that >> 28 # the host compiler might have on by default. Given that EV4 and EV5 >> 29 # have the same instruction set, prefer EV5 because an EV5 schedule is >> 30 # more likely to keep an EV4 processor busy than vice-versa. >> 31 cpuflags-$(CONFIG_ALPHA_GENERIC) := -mcpu=ev5 27 32 28 boot := arch/$(ARCH)/boot !! 33 cflags-y += $(cpuflags-y) 29 34 30 ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) << 31 KBUILD_CFLAGS += $(call cc-option,-mha << 32 else << 33 KBUILD_CFLAGS += $(call cc-option,-mso << 34 endif << 35 35 36 ifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y) !! 36 # For TSUNAMI, we must have the assembler not emulate our instructions. 37 KBUILD_CFLAGS += $(call cc-option,-mha !! 37 # The same is true for IRONGATE, POLARIS, PYXIS. 38 else !! 38 # BWX is most important, but we don't really want any emulation ever. 39 KBUILD_CFLAGS += $(call cc-option,-mso !! 39 KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6 40 endif << 41 40 42 ifeq ($(CONFIG_OPENRISC_HAVE_INST_CMOV),y) !! 41 head-y := arch/alpha/kernel/head.o 43 KBUILD_CFLAGS += $(call cc-option,-mcm << 44 endif << 45 42 46 ifeq ($(CONFIG_OPENRISC_HAVE_INST_ROR),y) !! 43 core-y += arch/alpha/kernel/ arch/alpha/mm/ 47 KBUILD_CFLAGS += $(call cc-option,-mro !! 44 core-$(CONFIG_MATHEMU) += arch/alpha/math-emu/ 48 endif !! 45 drivers-$(CONFIG_OPROFILE) += arch/alpha/oprofile/ >> 46 libs-y += arch/alpha/lib/ 49 47 50 ifeq ($(CONFIG_OPENRISC_HAVE_INST_RORI),y) !! 48 # export what is needed by arch/alpha/boot/Makefile 51 KBUILD_CFLAGS += $(call cc-option,-mro !! 49 LIBS_Y := $(patsubst %/, %/lib.a, $(libs-y)) 52 endif !! 50 export LIBS_Y 53 51 54 ifeq ($(CONFIG_OPENRISC_HAVE_INST_SEXT),y) !! 52 boot := arch/alpha/boot 55 KBUILD_CFLAGS += $(call cc-option,-mse << 56 endif << 57 53 58 libs-y += $(LIBGCC) !! 54 #Default target when executing make with no arguments >> 55 all boot: $(boot)/vmlinux.gz 59 56 60 PHONY += vmlinux.bin !! 57 $(boot)/vmlinux.gz: vmlinux >> 58 $(Q)$(MAKE) $(build)=$(boot) $@ 61 59 62 vmlinux.bin: vmlinux !! 60 bootimage bootpfile bootpzfile: vmlinux 63 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$ 61 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ >> 62 >> 63 archclean: >> 64 $(Q)$(MAKE) $(clean)=$(boot) >> 65 >> 66 archheaders: >> 67 $(Q)$(MAKE) $(build)=arch/alpha/kernel/syscalls all >> 68 >> 69 define archhelp >> 70 echo '* boot - Compressed kernel image (arch/alpha/boot/vmlinux.gz)' >> 71 echo ' bootimage - SRM bootable image (arch/alpha/boot/bootimage)' >> 72 echo ' bootpfile - BOOTP bootable image (arch/alpha/boot/bootpfile)' >> 73 echo ' bootpzfile - compressed kernel BOOTP image (arch/alpha/boot/bootpzfile)' >> 74 endef
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.