>> 1 # $Id: Makefile,v 1.51.2.1 2002/03/14 01:26:21 kanoj Exp $ >> 2 # sparc64/Makefile 1 # 3 # 2 # m68k/Makefile !! 4 # Makefile for the architecture dependent flags and dependencies on the >> 5 # 64-bit Sparc. 3 # 6 # 4 # This file is included by the global makefile !! 7 # Copyright (C) 1996,1998 David S. Miller (davem@caip.rutgers.edu) 5 # architecture-specific flags and dependencies !! 8 # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 6 # << 7 # This file is subject to the terms and condit << 8 # License. See the file "COPYING" in the main << 9 # for more details. << 10 # << 11 # Copyright (C) 1994 by Hamish Macdonald << 12 # Copyright (C) 2002,2011 Greg Ungerer <gerg@sn << 13 # 9 # 14 10 15 KBUILD_DEFCONFIG := multi_defconfig !! 11 # If the solaris /bin/sh wasn't so broken, I wouldn't need the following >> 12 # line... >> 13 SHELL =/bin/bash 16 14 17 ifdef cross_compiling !! 15 CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi ) 18 ifeq ($(CROSS_COMPILE),) << 19 CROSS_COMPILE := $(call cc-cro << 20 m68k-linux-gnu- m68k-l << 21 endif << 22 endif << 23 16 24 # !! 17 NEW_GCC := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; ) 25 # Enable processor type. Ordering of the !! 18 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) 26 # use the minimum processor type of the !! 19 UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) 27 # for 680x0 will only allow use of the - !! 20 INLINE_LIMIT := $(shell if $(CC) -m64 -finline-limit=100000 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; ) 28 # 680x0 type is specified - and no optio << 29 # 68020. The other m68k/ColdFire types a << 30 # compiler cpu type flag. << 31 # << 32 ifndef CONFIG_M68040 << 33 cpuflags-$(CONFIG_M68060) = -m68060 << 34 endif << 35 ifndef CONFIG_M68060 << 36 cpuflags-$(CONFIG_M68040) = -m68040 << 37 endif << 38 cpuflags-$(CONFIG_M68030) = << 39 cpuflags-$(CONFIG_M68020) = << 40 cpuflags-$(CONFIG_M68000) = -m68000 << 41 cpuflags-$(CONFIG_M5441x) = $(call cc-op << 42 cpuflags-$(CONFIG_M54xx) = $(call cc-op << 43 cpuflags-$(CONFIG_M5407) = $(call cc-op << 44 cpuflags-$(CONFIG_M532x) = $(call cc-op << 45 cpuflags-$(CONFIG_M537x) = $(call cc-op << 46 cpuflags-$(CONFIG_M5307) = $(call cc-op << 47 cpuflags-$(CONFIG_M528x) = $(call cc-op << 48 cpuflags-$(CONFIG_M5275) = $(call cc-op << 49 cpuflags-$(CONFIG_M5272) = $(call cc-op << 50 cpuflags-$(CONFIG_M5271) = $(call cc-op << 51 cpuflags-$(CONFIG_M523x) = $(call cc-op << 52 cpuflags-$(CONFIG_M525x) = $(call cc-op << 53 cpuflags-$(CONFIG_M5249) = $(call cc-op << 54 cpuflags-$(CONFIG_M520x) = $(call cc-op << 55 cpuflags-$(CONFIG_M5206e) = $(call cc-op << 56 cpuflags-$(CONFIG_M5206) = $(call cc-op << 57 << 58 # Evaluate tune cc-option calls now << 59 cpuflags-y := $(cpuflags-y) << 60 21 61 KBUILD_AFLAGS += $(cpuflags-y) !! 22 export NEW_GCC 62 KBUILD_CFLAGS += $(cpuflags-y) << 63 23 64 KBUILD_CFLAGS += -pipe -ffreestanding !! 24 ifneq ($(NEW_GAS),y) >> 25 AS = sparc64-linux-as >> 26 LD = sparc64-linux-ld >> 27 NM = sparc64-linux-nm >> 28 AR = sparc64-linux-ar >> 29 RANLIB = sparc64-linux-ranlib >> 30 else >> 31 AS := $(AS) -64 >> 32 LD := $(LD) -m elf64_sparc >> 33 endif >> 34 ELFTOAOUT = elftoaout >> 35 ifneq ($(UNDECLARED_REGS),y) >> 36 CC_UNDECL = >> 37 else >> 38 CC_UNDECL = -Wa,--undeclared-regs >> 39 AS := $(AS) --undeclared-regs >> 40 endif 65 41 66 ifdef CONFIG_MMU !! 42 ifneq ($(NEW_GCC),y) 67 KBUILD_CFLAGS += -ffixed-a2 !! 43 CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ >> 44 -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare 68 else 45 else 69 # we can use a m68k-linux-gcc toolchain with t !! 46 CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 70 KBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\" !! 47 -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare \ 71 KBUILD_CPPFLAGS += -D__uClinux__ !! 48 $(CC_UNDECL) >> 49 AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 72 endif 50 endif 73 51 74 KBUILD_LDFLAGS := -m m68kelf !! 52 ifeq ($(INLINE_LIMIT),y) >> 53 CFLAGS := $(CFLAGS) -finline-limit=100000 >> 54 endif 75 55 76 ifdef CONFIG_SUN3 !! 56 ifeq ($(CONFIG_MCOUNT),y) 77 LDFLAGS_vmlinux = -N !! 57 CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) >> 58 CFLAGS := $(CFLAGS) -pg 78 endif 59 endif 79 60 80 CHECKFLAGS += -D__mc68000__ !! 61 LINKFLAGS = -T arch/sparc64/vmlinux.lds >> 62 >> 63 HEAD := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o 81 64 >> 65 SUBDIRS += arch/sparc64/kernel arch/sparc64/lib arch/sparc64/mm \ >> 66 arch/sparc64/prom 82 67 83 ifdef CONFIG_KGDB !! 68 ifneq ($(CONFIG_SOLARIS_EMUL),n) 84 # If configured for kgdb support, include debu !! 69 SUBDIRS += arch/sparc64/solaris 85 # frame pointer << 86 KBUILD_CFLAGS := $(subst -fomit-frame-pointer, << 87 endif 70 endif 88 71 89 libs-y += arch/m68k/l !! 72 SUBDIRS += arch/sparc64/math-emu 90 73 >> 74 CORE_FILES := arch/sparc64/kernel/kernel.o arch/sparc64/mm/mm.o $(CORE_FILES) 91 75 92 all: zImage !! 76 ifeq ($(CONFIG_SOLARIS_EMUL),y) >> 77 CORE_FILES += arch/sparc64/solaris/solaris.o >> 78 endif 93 79 94 lilo: vmlinux !! 80 CORE_FILES += arch/sparc64/math-emu/math-emu.o 95 if [ -f $(INSTALL_PATH)/vmlinux ]; the << 96 if [ -f $(INSTALL_PATH)/System.map ]; << 97 cat vmlinux > $(INSTALL_PATH)/vmlinux << 98 cp System.map $(INSTALL_PATH)/System.m << 99 if [ -x /sbin/lilo ]; then /sbin/lilo; << 100 81 101 zImage compressed: vmlinux.gz !! 82 LIBS := $(TOPDIR)/lib/lib.a $(LIBS) $(TOPDIR)/arch/sparc64/prom/promlib.a \ >> 83 $(TOPDIR)/arch/sparc64/lib/lib.a 102 84 103 vmlinux.gz: vmlinux !! 85 vmlinux.aout: vmlinux >> 86 $(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux 104 87 105 ifndef CONFIG_KGDB !! 88 archmrproper: 106 cp vmlinux vmlinux.tmp !! 89 rm -f $(TOPDIR)/include/asm-sparc64/asm_offsets.h 107 $(STRIP) vmlinux.tmp << 108 $(KGZIP) -9c vmlinux.tmp >vmlinux.gz << 109 rm vmlinux.tmp << 110 else << 111 $(KGZIP) -9c vmlinux >vmlinux.gz << 112 endif << 113 90 114 bzImage: vmlinux.bz2 !! 91 archdep: check_asm 115 92 116 vmlinux.bz2: vmlinux !! 93 check_asm: include/linux/version.h >> 94 $(MAKE) -C arch/sparc64/kernel check_asm 117 95 118 ifndef CONFIG_KGDB << 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 96 127 CLEAN_FILES += vmlinux.gz vmlinux.bz2 !! 97 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot >> 98 >> 99 archclean: >> 100 @$(MAKEBOOT) clean 128 101 129 archheaders: !! 102 tftpboot.img: 130 $(Q)$(MAKE) $(build)=arch/m68k/kernel/ !! 103 @$(MAKEBOOT) tftpboot.img 131 104 132 install: KBUILD_IMAGE := vmlinux.gz !! 105 image: 133 install: !! 106 @$(MAKEBOOT) image 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.