162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# m68k/Makefile 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci# This file is included by the global makefile so that you can add your own 562306a36Sopenharmony_ci# architecture-specific flags and dependencies. 662306a36Sopenharmony_ci# 762306a36Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 862306a36Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 962306a36Sopenharmony_ci# for more details. 1062306a36Sopenharmony_ci# 1162306a36Sopenharmony_ci# Copyright (C) 1994 by Hamish Macdonald 1262306a36Sopenharmony_ci# Copyright (C) 2002,2011 Greg Ungerer <gerg@snapgear.com> 1362306a36Sopenharmony_ci# 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciKBUILD_DEFCONFIG := multi_defconfig 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciifdef cross_compiling 1862306a36Sopenharmony_ci ifeq ($(CROSS_COMPILE),) 1962306a36Sopenharmony_ci CROSS_COMPILE := $(call cc-cross-prefix, \ 2062306a36Sopenharmony_ci m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) 2162306a36Sopenharmony_ci endif 2262306a36Sopenharmony_ciendif 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci# 2562306a36Sopenharmony_ci# Enable processor type. Ordering of these is important - we want to 2662306a36Sopenharmony_ci# use the minimum processor type of the range we support. The logic 2762306a36Sopenharmony_ci# for 680x0 will only allow use of the -m68060 or -m68040 if no other 2862306a36Sopenharmony_ci# 680x0 type is specified - and no option is specified for 68030 or 2962306a36Sopenharmony_ci# 68020. The other m68k/ColdFire types always specify some type of 3062306a36Sopenharmony_ci# compiler cpu type flag. 3162306a36Sopenharmony_ci# 3262306a36Sopenharmony_ciifndef CONFIG_M68040 3362306a36Sopenharmony_cicpuflags-$(CONFIG_M68060) = -m68060 3462306a36Sopenharmony_ciendif 3562306a36Sopenharmony_ciifndef CONFIG_M68060 3662306a36Sopenharmony_cicpuflags-$(CONFIG_M68040) = -m68040 3762306a36Sopenharmony_ciendif 3862306a36Sopenharmony_cicpuflags-$(CONFIG_M68030) = 3962306a36Sopenharmony_cicpuflags-$(CONFIG_M68020) = 4062306a36Sopenharmony_cicpuflags-$(CONFIG_M68000) = -m68000 4162306a36Sopenharmony_cicpuflags-$(CONFIG_M5441x) = $(call cc-option,-mcpu=54455,-mcfv4e) 4262306a36Sopenharmony_cicpuflags-$(CONFIG_M54xx) = $(call cc-option,-mcpu=5475,-m5200) 4362306a36Sopenharmony_cicpuflags-$(CONFIG_M5407) = $(call cc-option,-mcpu=5407,-m5200) 4462306a36Sopenharmony_cicpuflags-$(CONFIG_M532x) = $(call cc-option,-mcpu=532x,-m5307) 4562306a36Sopenharmony_cicpuflags-$(CONFIG_M537x) = $(call cc-option,-mcpu=537x,-m5307) 4662306a36Sopenharmony_cicpuflags-$(CONFIG_M5307) = $(call cc-option,-mcpu=5307,-m5200) 4762306a36Sopenharmony_cicpuflags-$(CONFIG_M528x) = $(call cc-option,-mcpu=528x,-m5307) 4862306a36Sopenharmony_cicpuflags-$(CONFIG_M5275) = $(call cc-option,-mcpu=5275,-m5307) 4962306a36Sopenharmony_cicpuflags-$(CONFIG_M5272) = $(call cc-option,-mcpu=5272,-m5307) 5062306a36Sopenharmony_cicpuflags-$(CONFIG_M5271) = $(call cc-option,-mcpu=5271,-m5307) 5162306a36Sopenharmony_cicpuflags-$(CONFIG_M523x) = $(call cc-option,-mcpu=523x,-m5307) 5262306a36Sopenharmony_cicpuflags-$(CONFIG_M525x) = $(call cc-option,-mcpu=5253,-m5200) 5362306a36Sopenharmony_cicpuflags-$(CONFIG_M5249) = $(call cc-option,-mcpu=5249,-m5200) 5462306a36Sopenharmony_cicpuflags-$(CONFIG_M520x) = $(call cc-option,-mcpu=5208,-m5200) 5562306a36Sopenharmony_cicpuflags-$(CONFIG_M5206e) = $(call cc-option,-mcpu=5206e,-m5200) 5662306a36Sopenharmony_cicpuflags-$(CONFIG_M5206) = $(call cc-option,-mcpu=5206,-m5200) 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci# Evaluate tune cc-option calls now 5962306a36Sopenharmony_cicpuflags-y := $(cpuflags-y) 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciKBUILD_AFLAGS += $(cpuflags-y) 6262306a36Sopenharmony_ciKBUILD_CFLAGS += $(cpuflags-y) 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ciKBUILD_CFLAGS += -pipe -ffreestanding 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciifdef CONFIG_MMU 6762306a36Sopenharmony_ciKBUILD_CFLAGS += -ffixed-a2 6862306a36Sopenharmony_cielse 6962306a36Sopenharmony_ci# we can use a m68k-linux-gcc toolchain with these in place 7062306a36Sopenharmony_ciKBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\" 7162306a36Sopenharmony_ciKBUILD_CPPFLAGS += -D__uClinux__ 7262306a36Sopenharmony_ciendif 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciKBUILD_LDFLAGS := -m m68kelf 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ciifdef CONFIG_SUN3 7762306a36Sopenharmony_ciLDFLAGS_vmlinux = -N 7862306a36Sopenharmony_ciendif 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ciCHECKFLAGS += -D__mc68000__ 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ciifdef CONFIG_KGDB 8462306a36Sopenharmony_ci# If configured for kgdb support, include debugging infos and keep the 8562306a36Sopenharmony_ci# frame pointer 8662306a36Sopenharmony_ciKBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g 8762306a36Sopenharmony_ciendif 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_cilibs-y += arch/m68k/lib/ 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ciall: zImage 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_cililo: vmlinux 9562306a36Sopenharmony_ci if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi 9662306a36Sopenharmony_ci if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi 9762306a36Sopenharmony_ci cat vmlinux > $(INSTALL_PATH)/vmlinux 9862306a36Sopenharmony_ci cp System.map $(INSTALL_PATH)/System.map 9962306a36Sopenharmony_ci if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_cizImage compressed: vmlinux.gz 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_civmlinux.gz: vmlinux 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ciifndef CONFIG_KGDB 10662306a36Sopenharmony_ci cp vmlinux vmlinux.tmp 10762306a36Sopenharmony_ci $(STRIP) vmlinux.tmp 10862306a36Sopenharmony_ci $(KGZIP) -9c vmlinux.tmp >vmlinux.gz 10962306a36Sopenharmony_ci rm vmlinux.tmp 11062306a36Sopenharmony_cielse 11162306a36Sopenharmony_ci $(KGZIP) -9c vmlinux >vmlinux.gz 11262306a36Sopenharmony_ciendif 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_cibzImage: vmlinux.bz2 11562306a36Sopenharmony_ci 11662306a36Sopenharmony_civmlinux.bz2: vmlinux 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ciifndef CONFIG_KGDB 11962306a36Sopenharmony_ci cp vmlinux vmlinux.tmp 12062306a36Sopenharmony_ci $(STRIP) vmlinux.tmp 12162306a36Sopenharmony_ci $(KBZIP2) -1c vmlinux.tmp >vmlinux.bz2 12262306a36Sopenharmony_ci rm vmlinux.tmp 12362306a36Sopenharmony_cielse 12462306a36Sopenharmony_ci $(KBZIP2) -1c vmlinux >vmlinux.bz2 12562306a36Sopenharmony_ciendif 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_ciCLEAN_FILES += vmlinux.gz vmlinux.bz2 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ciarchheaders: 13062306a36Sopenharmony_ci $(Q)$(MAKE) $(build)=arch/m68k/kernel/syscalls all 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciinstall: KBUILD_IMAGE := vmlinux.gz 13362306a36Sopenharmony_ciinstall: 13462306a36Sopenharmony_ci $(call cmd,install) 135