1 # SPDX-License-Identifier: GPL-2.0 !! 1 # 2 # Makefile for the Hexagon arch !! 2 # m68k/Makefile 3 !! 3 # 4 KBUILD_DEFCONFIG = comet_defconfig !! 4 # This file is included by the global makefile so that you can add your own 5 !! 5 # architecture-specific flags and dependencies. Remember to do have actions 6 # Do not use GP-relative jumps !! 6 # for "archclean" and "archdep" for cleaning up and making dependencies for 7 KBUILD_CFLAGS += -G0 !! 7 # this architecture 8 LDFLAGS_vmlinux += -G0 !! 8 # 9 !! 9 # This file is subject to the terms and conditions of the GNU General Public 10 # Do not use single-byte enums; these will ove !! 10 # License. See the file "COPYING" in the main directory of this archive 11 KBUILD_CFLAGS += -fno-short-enums !! 11 # for more details. 12 !! 12 # 13 # We must use long-calls: !! 13 # Copyright (C) 1994 by Hamish Macdonald 14 KBUILD_CFLAGS += -mlong-calls !! 14 # 15 !! 15 16 # Modules must use either long-calls, or use p !! 16 # test for cross compiling 17 # Use long-calls for now, it's easier. And fa !! 17 COMPILE_ARCH = $(shell uname -m) 18 # KBUILD_CFLAGS_MODULE += -fPIC !! 18 19 # KBUILD_LDFLAGS_MODULE += -shared !! 19 # override top level makefile 20 KBUILD_CFLAGS_MODULE += -mlong-calls !! 20 AS += -m68020 21 !! 21 LDFLAGS := -m m68kelf 22 cflags-y += $(call cc-option,-mv${CONFIG_HEXAG !! 22 ifneq ($(COMPILE_ARCH),$(ARCH)) 23 aflags-y += $(call cc-option,-mv${CONFIG_HEXAG !! 23 # prefix for cross-compiling binaries 24 ldflags-y += $(call cc-option,-mv${CONFIG_HEXA !! 24 CROSS_COMPILE = m68k-linux- 25 !! 25 endif 26 KBUILD_CFLAGS += $(cflags-y) !! 26 27 KBUILD_AFLAGS += $(aflags-y) !! 27 ifdef CONFIG_SUN3 28 KBUILD_LDFLAGS += $(ldflags-y) !! 28 LDFLAGS_vmlinux = -N 29 !! 29 endif 30 # Thread-info register will be r19. This valu !! 30 31 # it is hard-coded in several files. !! 31 # without -fno-strength-reduce the 53c7xx.c driver fails ;-( 32 TIR_NAME := r19 !! 32 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 33 KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADI !! 33 34 KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME) !! 34 # enable processor switch if compiled only for a single cpu >> 35 ifndef CONFIG_M68020 >> 36 ifndef CONFIG_M68030 >> 37 >> 38 ifndef CONFIG_M68060 >> 39 CFLAGS := $(CFLAGS) -m68040 >> 40 endif >> 41 >> 42 ifndef CONFIG_M68040 >> 43 CFLAGS := $(CFLAGS) -m68060 >> 44 endif >> 45 >> 46 endif >> 47 endif >> 48 >> 49 ifdef CONFIG_KGDB >> 50 # If configured for kgdb support, include debugging infos and keep the >> 51 # frame pointer >> 52 CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g >> 53 endif >> 54 >> 55 ifndef CONFIG_SUN3 >> 56 head-y := arch/m68k/kernel/head.o >> 57 else >> 58 head-y := arch/m68k/kernel/sun3-head.o >> 59 endif >> 60 >> 61 core-y += arch/m68k/kernel/ arch/m68k/mm/ >> 62 libs-y += arch/m68k/lib/ >> 63 >> 64 core-$(CONFIG_Q40) += arch/m68k/q40/ >> 65 core-$(CONFIG_AMIGA) += arch/m68k/amiga/ >> 66 core-$(CONFIG_ATARI) += arch/m68k/atari/ >> 67 core-$(CONFIG_MAC) += arch/m68k/mac/ >> 68 core-$(CONFIG_HP300) += arch/m68k/hp300/ >> 69 core-$(CONFIG_APOLLO) += arch/m68k/apollo/ >> 70 core-$(CONFIG_MVME147) += arch/m68k/mvme147/ >> 71 core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/ >> 72 core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/ >> 73 core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/ >> 74 core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/ >> 75 core-$(CONFIG_M68040) += arch/m68k/fpsp040/ >> 76 core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ >> 77 core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ >> 78 >> 79 all: zImage >> 80 >> 81 lilo: vmlinux >> 82 if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi >> 83 if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi >> 84 cat vmlinux > $(INSTALL_PATH)/vmlinux >> 85 cp System.map $(INSTALL_PATH)/System.map >> 86 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi >> 87 >> 88 zImage compressed: vmlinux.gz >> 89 >> 90 vmlinux.gz: vmlinux >> 91 >> 92 ifndef CONFIG_KGDB >> 93 cp vmlinux vmlinux.tmp >> 94 $(STRIP) vmlinux.tmp >> 95 gzip -9c vmlinux.tmp >vmlinux.gz >> 96 rm vmlinux.tmp >> 97 else >> 98 gzip -9c vmlinux >vmlinux.gz >> 99 endif >> 100 >> 101 bzImage: vmlinux.bz2 >> 102 >> 103 vmlinux.bz2: vmlinux >> 104 >> 105 ifndef CONFIG_KGDB >> 106 cp vmlinux vmlinux.tmp >> 107 $(STRIP) vmlinux.tmp >> 108 bzip2 -1c vmlinux.tmp >vmlinux.bz2 >> 109 rm vmlinux.tmp >> 110 else >> 111 bzip2 -1c vmlinux >vmlinux.bz2 >> 112 endif >> 113 >> 114 archclean: >> 115 rm -f vmlinux.gz vmlinux.bz2 >> 116 rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.