1 # 1 # 2 # m68k/Makefile 2 # m68k/Makefile 3 # 3 # 4 # This file is included by the global makefile 4 # This file is included by the global makefile so that you can add your own 5 # architecture-specific flags and dependencies !! 5 # architecture-specific flags and dependencies. Remember to do have actions >> 6 # for "archclean" and "archdep" for cleaning up and making dependencies for >> 7 # this architecture 6 # 8 # 7 # This file is subject to the terms and condit 9 # This file is subject to the terms and conditions of the GNU General Public 8 # License. See the file "COPYING" in the main 10 # License. See the file "COPYING" in the main directory of this archive 9 # for more details. 11 # for more details. 10 # 12 # 11 # Copyright (C) 1994 by Hamish Macdonald 13 # Copyright (C) 1994 by Hamish Macdonald 12 # Copyright (C) 2002,2011 Greg Ungerer <gerg@sn << 13 # 14 # 14 15 15 KBUILD_DEFCONFIG := multi_defconfig 16 KBUILD_DEFCONFIG := multi_defconfig 16 17 17 ifdef cross_compiling !! 18 # override top level makefile 18 ifeq ($(CROSS_COMPILE),) !! 19 AS += -m68020 >> 20 LDFLAGS := -m m68kelf >> 21 LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds >> 22 ifneq ($(SUBARCH),$(ARCH)) >> 23 ifeq ($(CROSS_COMPILE),) 19 CROSS_COMPILE := $(call cc-cro 24 CROSS_COMPILE := $(call cc-cross-prefix, \ 20 m68k-linux-gnu- m68k-l 25 m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) 21 endif !! 26 endif 22 endif 27 endif 23 28 24 # !! 29 ifdef CONFIG_SUN3 25 # Enable processor type. Ordering of the !! 30 LDFLAGS_vmlinux = -N 26 # use the minimum processor type of the << 27 # for 680x0 will only allow use of the - << 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 31 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 << 61 KBUILD_AFLAGS += $(cpuflags-y) << 62 KBUILD_CFLAGS += $(cpuflags-y) << 63 32 64 KBUILD_CFLAGS += -pipe -ffreestanding !! 33 CHECKFLAGS += -D__mc68000__ 65 34 66 ifdef CONFIG_MMU !! 35 # without -fno-strength-reduce the 53c7xx.c driver fails ;-( 67 KBUILD_CFLAGS += -ffixed-a2 !! 36 KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 68 else << 69 # we can use a m68k-linux-gcc toolchain with t << 70 KBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\" << 71 KBUILD_CPPFLAGS += -D__uClinux__ << 72 endif << 73 37 74 KBUILD_LDFLAGS := -m m68kelf !! 38 # enable processor switch if compiled only for a single cpu >> 39 ifndef CONFIG_M68020 >> 40 ifndef CONFIG_M68030 75 41 76 ifdef CONFIG_SUN3 !! 42 ifndef CONFIG_M68060 77 LDFLAGS_vmlinux = -N !! 43 KBUILD_CFLAGS += -m68040 78 endif 44 endif 79 45 80 CHECKFLAGS += -D__mc68000__ !! 46 ifndef CONFIG_M68040 >> 47 KBUILD_CFLAGS += -m68060 >> 48 endif 81 49 >> 50 endif >> 51 endif 82 52 83 ifdef CONFIG_KGDB 53 ifdef CONFIG_KGDB 84 # If configured for kgdb support, include debu 54 # If configured for kgdb support, include debugging infos and keep the 85 # frame pointer 55 # frame pointer 86 KBUILD_CFLAGS := $(subst -fomit-frame-pointer, 56 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g 87 endif 57 endif 88 58 >> 59 ifndef CONFIG_SUN3 >> 60 head-y := arch/m68k/kernel/head.o >> 61 else >> 62 head-y := arch/m68k/kernel/sun3-head.o >> 63 endif >> 64 >> 65 core-y += arch/m68k/kernel/ arch/m68k/mm/ 89 libs-y += arch/m68k/l 66 libs-y += arch/m68k/lib/ 90 67 >> 68 core-$(CONFIG_Q40) += arch/m68k/q40/ >> 69 core-$(CONFIG_AMIGA) += arch/m68k/amiga/ >> 70 core-$(CONFIG_ATARI) += arch/m68k/atari/ >> 71 core-$(CONFIG_MAC) += arch/m68k/mac/ >> 72 core-$(CONFIG_HP300) += arch/m68k/hp300/ >> 73 core-$(CONFIG_APOLLO) += arch/m68k/apollo/ >> 74 core-$(CONFIG_MVME147) += arch/m68k/mvme147/ >> 75 core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/ >> 76 core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/ >> 77 core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/ >> 78 core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/ >> 79 core-$(CONFIG_M68040) += arch/m68k/fpsp040/ >> 80 core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ >> 81 core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ 91 82 92 all: zImage 83 all: zImage 93 84 94 lilo: vmlinux 85 lilo: vmlinux 95 if [ -f $(INSTALL_PATH)/vmlinux ]; the 86 if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi 96 if [ -f $(INSTALL_PATH)/System.map ]; 87 if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi 97 cat vmlinux > $(INSTALL_PATH)/vmlinux 88 cat vmlinux > $(INSTALL_PATH)/vmlinux 98 cp System.map $(INSTALL_PATH)/System.m 89 cp System.map $(INSTALL_PATH)/System.map 99 if [ -x /sbin/lilo ]; then /sbin/lilo; 90 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 100 91 101 zImage compressed: vmlinux.gz 92 zImage compressed: vmlinux.gz 102 93 103 vmlinux.gz: vmlinux 94 vmlinux.gz: vmlinux 104 95 105 ifndef CONFIG_KGDB 96 ifndef CONFIG_KGDB 106 cp vmlinux vmlinux.tmp 97 cp vmlinux vmlinux.tmp 107 $(STRIP) vmlinux.tmp 98 $(STRIP) vmlinux.tmp 108 $(KGZIP) -9c vmlinux.tmp >vmlinux.gz !! 99 gzip -9c vmlinux.tmp >vmlinux.gz 109 rm vmlinux.tmp 100 rm vmlinux.tmp 110 else 101 else 111 $(KGZIP) -9c vmlinux >vmlinux.gz !! 102 gzip -9c vmlinux >vmlinux.gz 112 endif 103 endif 113 104 114 bzImage: vmlinux.bz2 105 bzImage: vmlinux.bz2 115 106 116 vmlinux.bz2: vmlinux 107 vmlinux.bz2: vmlinux 117 108 118 ifndef CONFIG_KGDB 109 ifndef CONFIG_KGDB 119 cp vmlinux vmlinux.tmp 110 cp vmlinux vmlinux.tmp 120 $(STRIP) vmlinux.tmp 111 $(STRIP) vmlinux.tmp 121 $(KBZIP2) -1c vmlinux.tmp >vmlinux.bz2 !! 112 bzip2 -1c vmlinux.tmp >vmlinux.bz2 122 rm vmlinux.tmp 113 rm vmlinux.tmp 123 else 114 else 124 $(KBZIP2) -1c vmlinux >vmlinux.bz2 !! 115 bzip2 -1c vmlinux >vmlinux.bz2 125 endif 116 endif 126 117 127 CLEAN_FILES += vmlinux.gz vmlinux.bz2 !! 118 archclean: 128 !! 119 rm -f vmlinux.gz vmlinux.bz2 129 archheaders: << 130 $(Q)$(MAKE) $(build)=arch/m68k/kernel/ << 131 120 132 install: KBUILD_IMAGE := vmlinux.gz << 133 install: 121 install: 134 $(call cmd,install) !! 122 sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.