| 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 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | # override top level makefile | 
|  | 17 | AS += -m68020 | 
|  | 18 | LDFLAGS := -m m68kelf | 
| Roman Zippel | fbe9c96 | 2007-05-31 00:40:50 -0700 | [diff] [blame] | 19 | LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 
| Geert Uytterhoeven | 6f7127d | 2008-02-04 22:30:17 -0800 | [diff] [blame^] | 20 | ifneq ($(SUBARCH),$(ARCH)) | 
|  | 21 | ifeq ($(CROSS_COMPILE),) | 
|  | 22 | CROSS_COMPILE := $(call cc-cross-prefix, \ | 
|  | 23 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | 
|  | 24 | endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | endif | 
|  | 26 |  | 
|  | 27 | ifdef CONFIG_SUN3 | 
|  | 28 | LDFLAGS_vmlinux = -N | 
|  | 29 | endif | 
|  | 30 |  | 
|  | 31 | CHECKFLAGS += -D__mc68000__ | 
|  | 32 |  | 
|  | 33 | # without -fno-strength-reduce the 53c7xx.c driver fails ;-( | 
| Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 34 | KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 |  | 
|  | 36 | # enable processor switch if compiled only for a single cpu | 
|  | 37 | ifndef CONFIG_M68020 | 
|  | 38 | ifndef CONFIG_M68030 | 
|  | 39 |  | 
|  | 40 | ifndef CONFIG_M68060 | 
| Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 41 | KBUILD_CFLAGS += -m68040 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | endif | 
|  | 43 |  | 
|  | 44 | ifndef CONFIG_M68040 | 
| Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 45 | KBUILD_CFLAGS += -m68060 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | endif | 
|  | 47 |  | 
|  | 48 | endif | 
|  | 49 | endif | 
|  | 50 |  | 
|  | 51 | ifdef CONFIG_KGDB | 
|  | 52 | # If configured for kgdb support, include debugging infos and keep the | 
|  | 53 | # frame pointer | 
| Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 54 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | endif | 
|  | 56 |  | 
|  | 57 | ifndef CONFIG_SUN3 | 
|  | 58 | head-y := arch/m68k/kernel/head.o | 
|  | 59 | else | 
|  | 60 | head-y := arch/m68k/kernel/sun3-head.o | 
|  | 61 | endif | 
|  | 62 |  | 
|  | 63 | core-y				+= arch/m68k/kernel/	arch/m68k/mm/ | 
|  | 64 | libs-y				+= arch/m68k/lib/ | 
|  | 65 |  | 
|  | 66 | core-$(CONFIG_Q40)		+= arch/m68k/q40/ | 
|  | 67 | core-$(CONFIG_AMIGA)		+= arch/m68k/amiga/ | 
|  | 68 | core-$(CONFIG_ATARI)		+= arch/m68k/atari/ | 
|  | 69 | core-$(CONFIG_MAC)		+= arch/m68k/mac/ | 
|  | 70 | core-$(CONFIG_HP300)		+= arch/m68k/hp300/ | 
|  | 71 | core-$(CONFIG_APOLLO)		+= arch/m68k/apollo/ | 
|  | 72 | core-$(CONFIG_MVME147)		+= arch/m68k/mvme147/ | 
|  | 73 | core-$(CONFIG_MVME16x)		+= arch/m68k/mvme16x/ | 
|  | 74 | core-$(CONFIG_BVME6000)		+= arch/m68k/bvme6000/ | 
|  | 75 | core-$(CONFIG_SUN3X)		+= arch/m68k/sun3x/	arch/m68k/sun3/ | 
|  | 76 | core-$(CONFIG_SUN3)		+= arch/m68k/sun3/	arch/m68k/sun3/prom/ | 
|  | 77 | core-$(CONFIG_M68040)		+= arch/m68k/fpsp040/ | 
|  | 78 | core-$(CONFIG_M68060)		+= arch/m68k/ifpsp060/ | 
|  | 79 | core-$(CONFIG_M68KFPU_EMU)	+= arch/m68k/math-emu/ | 
|  | 80 |  | 
|  | 81 | all:	zImage | 
|  | 82 |  | 
|  | 83 | lilo:	vmlinux | 
|  | 84 | if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi | 
|  | 85 | if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi | 
|  | 86 | cat vmlinux > $(INSTALL_PATH)/vmlinux | 
|  | 87 | cp System.map $(INSTALL_PATH)/System.map | 
|  | 88 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi | 
|  | 89 |  | 
|  | 90 | zImage compressed: vmlinux.gz | 
|  | 91 |  | 
|  | 92 | vmlinux.gz: vmlinux | 
|  | 93 |  | 
|  | 94 | ifndef CONFIG_KGDB | 
|  | 95 | cp vmlinux vmlinux.tmp | 
|  | 96 | $(STRIP) vmlinux.tmp | 
|  | 97 | gzip -9c vmlinux.tmp >vmlinux.gz | 
|  | 98 | rm vmlinux.tmp | 
|  | 99 | else | 
|  | 100 | gzip -9c vmlinux >vmlinux.gz | 
|  | 101 | endif | 
|  | 102 |  | 
|  | 103 | bzImage: vmlinux.bz2 | 
|  | 104 |  | 
|  | 105 | vmlinux.bz2: vmlinux | 
|  | 106 |  | 
|  | 107 | ifndef CONFIG_KGDB | 
|  | 108 | cp vmlinux vmlinux.tmp | 
|  | 109 | $(STRIP) vmlinux.tmp | 
|  | 110 | bzip2 -1c vmlinux.tmp >vmlinux.bz2 | 
|  | 111 | rm vmlinux.tmp | 
|  | 112 | else | 
|  | 113 | bzip2 -1c vmlinux >vmlinux.bz2 | 
|  | 114 | endif | 
|  | 115 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | archclean: | 
|  | 117 | rm -f vmlinux.gz vmlinux.bz2 |