Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # m68k/Makefile |
| 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 | # |
| 15 | |
Adrian Bunk | b739912 | 2008-07-17 21:16:14 +0200 | [diff] [blame] | 16 | KBUILD_DEFCONFIG := multi_defconfig |
Adrian Bunk | ef85ecbf | 2008-04-04 14:57:38 +0200 | [diff] [blame] | 17 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | # override top level makefile |
| 19 | AS += -m68020 |
| 20 | LDFLAGS := -m m68kelf |
Sam Ravnborg | 6588169 | 2010-07-28 17:33:09 +0200 | [diff] [blame] | 21 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
Geert Uytterhoeven | 6f7127d | 2008-02-04 22:30:17 -0800 | [diff] [blame] | 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 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | endif |
| 28 | |
| 29 | ifdef CONFIG_SUN3 |
| 30 | LDFLAGS_vmlinux = -N |
| 31 | endif |
| 32 | |
| 33 | CHECKFLAGS += -D__mc68000__ |
| 34 | |
| 35 | # without -fno-strength-reduce the 53c7xx.c driver fails ;-( |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 36 | KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
| 38 | # enable processor switch if compiled only for a single cpu |
| 39 | ifndef CONFIG_M68020 |
| 40 | ifndef CONFIG_M68030 |
| 41 | |
| 42 | ifndef CONFIG_M68060 |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 43 | KBUILD_CFLAGS += -m68040 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | endif |
| 45 | |
| 46 | ifndef CONFIG_M68040 |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 47 | KBUILD_CFLAGS += -m68060 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | endif |
| 49 | |
| 50 | endif |
| 51 | endif |
| 52 | |
| 53 | ifdef CONFIG_KGDB |
| 54 | # If configured for kgdb support, include debugging infos and keep the |
| 55 | # frame pointer |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 56 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | endif |
| 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/ |
| 66 | libs-y += arch/m68k/lib/ |
| 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/ |
Petr Stehlik | 65cd577 | 2008-11-18 21:02:18 +0100 | [diff] [blame^] | 79 | core-$(CONFIG_NATFEAT) += arch/m68k/emu/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | core-$(CONFIG_M68040) += arch/m68k/fpsp040/ |
| 81 | core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ |
| 82 | core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ |
| 83 | |
| 84 | all: zImage |
| 85 | |
| 86 | lilo: vmlinux |
| 87 | if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi |
| 88 | if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi |
| 89 | cat vmlinux > $(INSTALL_PATH)/vmlinux |
| 90 | cp System.map $(INSTALL_PATH)/System.map |
| 91 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi |
| 92 | |
| 93 | zImage compressed: vmlinux.gz |
| 94 | |
| 95 | vmlinux.gz: vmlinux |
| 96 | |
| 97 | ifndef CONFIG_KGDB |
| 98 | cp vmlinux vmlinux.tmp |
| 99 | $(STRIP) vmlinux.tmp |
| 100 | gzip -9c vmlinux.tmp >vmlinux.gz |
| 101 | rm vmlinux.tmp |
| 102 | else |
| 103 | gzip -9c vmlinux >vmlinux.gz |
| 104 | endif |
| 105 | |
| 106 | bzImage: vmlinux.bz2 |
| 107 | |
| 108 | vmlinux.bz2: vmlinux |
| 109 | |
| 110 | ifndef CONFIG_KGDB |
| 111 | cp vmlinux vmlinux.tmp |
| 112 | $(STRIP) vmlinux.tmp |
| 113 | bzip2 -1c vmlinux.tmp >vmlinux.bz2 |
| 114 | rm vmlinux.tmp |
| 115 | else |
| 116 | bzip2 -1c vmlinux >vmlinux.bz2 |
| 117 | endif |
| 118 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | archclean: |
| 120 | rm -f vmlinux.gz vmlinux.bz2 |
Laurent Vivier | 612bfc9 | 2008-10-30 21:17:47 +0100 | [diff] [blame] | 121 | |
| 122 | install: |
| 123 | sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" |