1 # SPDX-License-Identifier: GPL-2.0-only !! 1 # 2 OBJCOPYFLAGS :=-O binary !! 2 # m68k/Makefile 3 GZFLAGS :=-9 !! 3 # >> 4 # This file is included by the global makefile so that you can add your own >> 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 >> 8 # >> 9 # This file is subject to the terms and conditions of the GNU General Public >> 10 # License. See the file "COPYING" in the main directory of this archive >> 11 # for more details. >> 12 # >> 13 # Copyright (C) 1994 by Hamish Macdonald >> 14 # 4 15 5 ifdef CONFIG_CPU_HAS_FPU !! 16 KBUILD_DEFCONFIG := multi_defconfig 6 FPUEXT = f << 7 endif << 8 17 9 ifdef CONFIG_CPU_HAS_VDSP !! 18 # override top level makefile 10 VDSPEXT = v !! 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),) >> 24 CROSS_COMPILE := $(call cc-cross-prefix, \ >> 25 m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) >> 26 endif 11 endif 27 endif 12 28 13 ifdef CONFIG_CPU_HAS_TEE !! 29 ifdef CONFIG_SUN3 14 TEEEXT = t !! 30 LDFLAGS_vmlinux = -N 15 endif 31 endif 16 32 17 ifdef CONFIG_CPU_CK610 !! 33 CHECKFLAGS += -D__mc68000__ 18 CPUTYPE = ck610 << 19 CSKYABI = abiv1 << 20 endif << 21 34 22 ifdef CONFIG_CPU_CK810 !! 35 # without -fno-strength-reduce the 53c7xx.c driver fails ;-( 23 CPUTYPE = ck810 !! 36 KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 24 CSKYABI = abiv2 << 25 endif << 26 37 27 ifdef CONFIG_CPU_CK807 !! 38 # enable processor switch if compiled only for a single cpu 28 CPUTYPE = ck807 !! 39 ifndef CONFIG_M68020 29 CSKYABI = abiv2 !! 40 ifndef CONFIG_M68030 >> 41 >> 42 ifndef CONFIG_M68060 >> 43 KBUILD_CFLAGS += -m68040 30 endif 44 endif 31 45 32 ifdef CONFIG_CPU_CK860 !! 46 ifndef CONFIG_M68040 33 CPUTYPE = ck860 !! 47 KBUILD_CFLAGS += -m68060 34 CSKYABI = abiv2 << 35 endif 48 endif 36 49 37 ifneq ($(CSKYABI),) !! 50 endif 38 MCPU_STR = $(CPUTYPE)$(FPUEXT)$(VDSPEXT)$(TEEE << 39 KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$( << 40 KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME=\"$(MCPU_S << 41 KBUILD_CFLAGS += -msoft-float -mdiv << 42 KBUILD_CFLAGS += -fno-tree-vectorize << 43 endif 51 endif 44 52 45 KBUILD_CFLAGS += -pipe !! 53 ifdef CONFIG_KGDB 46 ifeq ($(CSKYABI),abiv2) !! 54 # If configured for kgdb support, include debugging infos and keep the 47 KBUILD_CFLAGS += -mno-stack-size !! 55 # frame pointer >> 56 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g 48 endif 57 endif 49 58 50 ifdef CONFIG_FRAME_POINTER !! 59 ifndef CONFIG_SUN3 51 KBUILD_CFLAGS += -mbacktrace !! 60 head-y := arch/m68k/kernel/head.o >> 61 else >> 62 head-y := arch/m68k/kernel/sun3-head.o 52 endif 63 endif 53 64 54 abidirs := $(patsubst %,arch/csky/%/,$(CSKYABI !! 65 core-y += arch/m68k/kernel/ arch/m68k/mm/ 55 KBUILD_CFLAGS += $(patsubst %,-I$(srctree)/%in !! 66 libs-y += arch/m68k/lib/ 56 67 57 KBUILD_CPPFLAGS += -mlittle-endian !! 68 core-$(CONFIG_Q40) += arch/m68k/q40/ 58 LDFLAGS += -EL !! 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/ 59 82 60 KBUILD_AFLAGS += $(KBUILD_CFLAGS) !! 83 all: zImage 61 84 62 core-y += arch/csky/$(CSKYABI)/ !! 85 lilo: vmlinux >> 86 if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi >> 87 if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi >> 88 cat vmlinux > $(INSTALL_PATH)/vmlinux >> 89 cp System.map $(INSTALL_PATH)/System.map >> 90 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 63 91 64 libs-y += arch/csky/lib/ \ !! 92 zImage compressed: vmlinux.gz 65 $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLA << 66 93 67 boot := arch/csky/boot !! 94 vmlinux.gz: vmlinux 68 95 69 all: zImage !! 96 ifndef CONFIG_KGDB >> 97 cp vmlinux vmlinux.tmp >> 98 $(STRIP) vmlinux.tmp >> 99 gzip -9c vmlinux.tmp >vmlinux.gz >> 100 rm vmlinux.tmp >> 101 else >> 102 gzip -9c vmlinux >vmlinux.gz >> 103 endif >> 104 >> 105 bzImage: vmlinux.bz2 >> 106 >> 107 vmlinux.bz2: vmlinux >> 108 >> 109 ifndef CONFIG_KGDB >> 110 cp vmlinux vmlinux.tmp >> 111 $(STRIP) vmlinux.tmp >> 112 bzip2 -1c vmlinux.tmp >vmlinux.bz2 >> 113 rm vmlinux.tmp >> 114 else >> 115 bzip2 -1c vmlinux >vmlinux.bz2 >> 116 endif 70 117 71 zImage Image uImage: vmlinux !! 118 archclean: 72 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$ !! 119 rm -f vmlinux.gz vmlinux.bz2 73 120 74 define archhelp !! 121 install: 75 echo '* zImage - Compressed kernel im !! 122 sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" 76 echo ' Image - Uncompressed kernel << 77 echo ' uImage - U-Boot wrapped zImag << 78 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.