1 # 1 # 2 # m68k/Makefile !! 2 # alpha/Makefile 3 # << 4 # This file is included by the global makefile << 5 # architecture-specific flags and dependencies << 6 # 3 # 7 # This file is subject to the terms and condit 4 # This file is subject to the terms and conditions of the GNU General Public 8 # License. See the file "COPYING" in the main 5 # License. See the file "COPYING" in the main directory of this archive 9 # for more details. 6 # for more details. 10 # 7 # 11 # Copyright (C) 1994 by Hamish Macdonald !! 8 # Copyright (C) 1994 by Linus Torvalds 12 # Copyright (C) 2002,2011 Greg Ungerer <gerg@sn << 13 # 9 # 14 10 15 KBUILD_DEFCONFIG := multi_defconfig !! 11 NM := $(NM) -B 16 12 17 ifdef cross_compiling !! 13 LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N #-relax 18 ifeq ($(CROSS_COMPILE),) !! 14 CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8 19 CROSS_COMPILE := $(call cc-cro << 20 m68k-linux-gnu- m68k-l << 21 endif << 22 endif << 23 15 24 # !! 16 # Determine if we can use the BWX instructions with GAS. 25 # Enable processor type. Ordering of the !! 17 old_gas := $(shell if $(AS) --version 2>&1 | grep 'version 2.7' > /dev/null; then echo y; else echo n; fi) 26 # use the minimum processor type of the !! 18 27 # for 680x0 will only allow use of the - !! 19 # Determine if GCC understands the -mcpu= option. 28 # 680x0 type is specified - and no optio !! 20 have_mcpu := $(shell if $(CC) -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) 29 # 68020. The other m68k/ColdFire types a !! 21 30 # compiler cpu type flag. !! 22 have_mcpu_pca56 := $(shell if $(CC) -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) 31 # !! 23 32 ifndef CONFIG_M68040 !! 24 have_mcpu_ev6 := $(shell if $(CC) -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) 33 cpuflags-$(CONFIG_M68060) = -m68060 !! 25 34 endif !! 26 have_mcpu_ev67 := $(shell if $(CC) -mcpu=ev67 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi) 35 ifndef CONFIG_M68060 !! 27 36 cpuflags-$(CONFIG_M68040) = -m68040 !! 28 # Turn on the proper cpu optimizations. 37 endif !! 29 ifeq ($(have_mcpu),y) 38 cpuflags-$(CONFIG_M68030) = !! 30 # If GENERIC, make sure to turn off any instruction set extensions that 39 cpuflags-$(CONFIG_M68020) = !! 31 # the host compiler might have on by default. Given that EV4 and EV5 40 cpuflags-$(CONFIG_M68000) = -m68000 !! 32 # have the same instruction set, prefer EV5 because an EV5 schedule is 41 cpuflags-$(CONFIG_M5441x) = $(call cc-op !! 33 # more likely to keep an EV4 processor busy than vice-versa. 42 cpuflags-$(CONFIG_M54xx) = $(call cc-op !! 34 mcpu_done := n 43 cpuflags-$(CONFIG_M5407) = $(call cc-op !! 35 ifeq ($(CONFIG_ALPHA_GENERIC),y) 44 cpuflags-$(CONFIG_M532x) = $(call cc-op !! 36 CFLAGS := $(CFLAGS) -mcpu=ev5 45 cpuflags-$(CONFIG_M537x) = $(call cc-op !! 37 mcpu_done := y 46 cpuflags-$(CONFIG_M5307) = $(call cc-op !! 38 endif 47 cpuflags-$(CONFIG_M528x) = $(call cc-op !! 39 ifeq ($(mcpu_done)$(CONFIG_ALPHA_SX164)$(have_mcpu_pca56),nyy) 48 cpuflags-$(CONFIG_M5275) = $(call cc-op !! 40 CFLAGS := $(CFLAGS) -mcpu=pca56 49 cpuflags-$(CONFIG_M5272) = $(call cc-op !! 41 mcpu_done := y 50 cpuflags-$(CONFIG_M5271) = $(call cc-op !! 42 endif 51 cpuflags-$(CONFIG_M523x) = $(call cc-op !! 43 ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS)$(have_mcpu_pca56),nyy) 52 cpuflags-$(CONFIG_M525x) = $(call cc-op !! 44 CFLAGS := $(CFLAGS) -mcpu=pca56 53 cpuflags-$(CONFIG_M5249) = $(call cc-op !! 45 mcpu_done := y 54 cpuflags-$(CONFIG_M520x) = $(call cc-op !! 46 endif 55 cpuflags-$(CONFIG_M5206e) = $(call cc-op !! 47 ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),ny) 56 cpuflags-$(CONFIG_M5206) = $(call cc-op !! 48 CFLAGS := $(CFLAGS) -mcpu=ev4 57 !! 49 mcpu_done := y 58 # Evaluate tune cc-option calls now !! 50 endif 59 cpuflags-y := $(cpuflags-y) !! 51 ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV56),ny) 60 !! 52 CFLAGS := $(CFLAGS) -mcpu=ev56 61 KBUILD_AFLAGS += $(cpuflags-y) !! 53 mcpu_done := y 62 KBUILD_CFLAGS += $(cpuflags-y) !! 54 endif 63 !! 55 ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV5),ny) 64 KBUILD_CFLAGS += -pipe -ffreestanding !! 56 CFLAGS := $(CFLAGS) -mcpu=ev5 65 !! 57 mcpu_done := y 66 ifdef CONFIG_MMU !! 58 endif 67 KBUILD_CFLAGS += -ffixed-a2 !! 59 ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV67)$(have_mcpu_ev67),nyy) 68 else !! 60 CFLAGS := $(CFLAGS) -mcpu=ev67 69 # we can use a m68k-linux-gcc toolchain with t !! 61 mcpu_done := y 70 KBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\" !! 62 endif 71 KBUILD_CPPFLAGS += -D__uClinux__ !! 63 ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),ny) >> 64 ifeq ($(have_mcpu_ev6),y) >> 65 CFLAGS := $(CFLAGS) -mcpu=ev6 >> 66 else >> 67 ifeq ($(have_mcpu_pca56),y) >> 68 CFLAGS := $(CFLAGS) -mcpu=pca56 >> 69 else >> 70 CFLAGS := $(CFLAGS) -mcpu=ev56 >> 71 endif >> 72 endif >> 73 mcpu_done := y >> 74 endif 72 endif 75 endif 73 76 74 KBUILD_LDFLAGS := -m m68kelf !! 77 # For TSUNAMI, we must have the assembler not emulate our instructions. >> 78 # The same is true for IRONGATE, POLARIS, PYXIS. >> 79 # BWX is most important, but we don't really want any emulation ever. 75 80 76 ifdef CONFIG_SUN3 !! 81 ifeq ($(old_gas),y) 77 LDFLAGS_vmlinux = -N !! 82 # How do we do #error in make? >> 83 CFLAGS := --error-please-upgrade-your-assembler 78 endif 84 endif >> 85 CFLAGS := $(CFLAGS) -Wa,-mev6 79 86 80 CHECKFLAGS += -D__mc68000__ !! 87 HEAD := arch/alpha/kernel/head.o 81 88 >> 89 SUBDIRS := $(SUBDIRS) arch/alpha/kernel arch/alpha/mm arch/alpha/lib \ >> 90 arch/alpha/math-emu >> 91 CORE_FILES := arch/alpha/kernel/kernel.o arch/alpha/mm/mm.o $(CORE_FILES) 82 92 83 ifdef CONFIG_KGDB !! 93 ifeq ($(CONFIG_MATHEMU),y) 84 # If configured for kgdb support, include debu !! 94 CORE_FILES := $(CORE_FILES) arch/alpha/math-emu/math-emu.o 85 # frame pointer << 86 KBUILD_CFLAGS := $(subst -fomit-frame-pointer, << 87 endif 95 endif 88 96 89 libs-y += arch/m68k/l !! 97 LIBS := $(TOPDIR)/arch/alpha/lib/lib.a $(LIBS) $(TOPDIR)/arch/alpha/lib/lib.a 90 98 >> 99 MAKEBOOT = $(MAKE) -C arch/alpha/boot 91 100 92 all: zImage !! 101 rawboot: >> 102 @$(MAKEBOOT) rawboot 93 103 94 lilo: vmlinux !! 104 # 95 if [ -f $(INSTALL_PATH)/vmlinux ]; the !! 105 # My boot writes directly to a specific disk partition, I doubt most 96 if [ -f $(INSTALL_PATH)/System.map ]; !! 106 # people will want to do that without changes.. 97 cat vmlinux > $(INSTALL_PATH)/vmlinux !! 107 # 98 cp System.map $(INSTALL_PATH)/System.m !! 108 msb my-special-boot: 99 if [ -x /sbin/lilo ]; then /sbin/lilo; !! 109 @$(MAKEBOOT) msb 100 110 101 zImage compressed: vmlinux.gz !! 111 bootimage: >> 112 @$(MAKEBOOT) bootimage 102 113 103 vmlinux.gz: vmlinux !! 114 srmboot: >> 115 @$(MAKEBOOT) srmboot 104 116 105 ifndef CONFIG_KGDB !! 117 archclean: 106 cp vmlinux vmlinux.tmp !! 118 @$(MAKE) -C arch/alpha/kernel clean 107 $(STRIP) vmlinux.tmp !! 119 @$(MAKEBOOT) clean 108 $(KGZIP) -9c vmlinux.tmp >vmlinux.gz !! 120 rm -f arch/alpha/vmlinux.lds 109 rm vmlinux.tmp << 110 else << 111 $(KGZIP) -9c vmlinux >vmlinux.gz << 112 endif << 113 121 114 bzImage: vmlinux.bz2 !! 122 archmrproper: 115 123 116 vmlinux.bz2: vmlinux !! 124 archdep: >> 125 @$(MAKEBOOT) dep 117 126 118 ifndef CONFIG_KGDB !! 127 vmlinux: arch/alpha/vmlinux.lds 119 cp vmlinux vmlinux.tmp << 120 $(STRIP) vmlinux.tmp << 121 $(KBZIP2) -1c vmlinux.tmp >vmlinux.bz2 << 122 rm vmlinux.tmp << 123 else << 124 $(KBZIP2) -1c vmlinux >vmlinux.bz2 << 125 endif << 126 128 127 CLEAN_FILES += vmlinux.gz vmlinux.bz2 !! 129 arch/alpha/vmlinux.lds: arch/alpha/vmlinux.lds.in >> 130 $(CPP) $(CPPFLAGS) -xc -P arch/alpha/vmlinux.lds.in -o arch/alpha/vmlinux.lds 128 131 129 archheaders: !! 132 bootpfile: 130 $(Q)$(MAKE) $(build)=arch/m68k/kernel/ !! 133 @$(MAKEBOOT) bootpfile 131 134 132 install: KBUILD_IMAGE := vmlinux.gz !! 135 bootpzfile: 133 install: !! 136 @$(MAKEBOOT) bootpzfile 134 $(call cmd,install) <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.