Back to home page

LXR

 
 

    


0001 #
0002 # m68k/Makefile
0003 #
0004 # This file is included by the global makefile so that you can add your own
0005 # architecture-specific flags and dependencies. Remember to do have actions
0006 # for "archclean" and "archdep" for cleaning up and making dependencies for
0007 # this architecture
0008 #
0009 # This file is subject to the terms and conditions of the GNU General Public
0010 # License.  See the file "COPYING" in the main directory of this archive
0011 # for more details.
0012 #
0013 # Copyright (C) 1994 by Hamish Macdonald
0014 # Copyright (C) 2002,2011 Greg Ungerer <gerg@snapgear.com>
0015 #
0016 
0017 KBUILD_DEFCONFIG := multi_defconfig
0018 
0019 ifneq ($(SUBARCH),$(ARCH))
0020         ifeq ($(CROSS_COMPILE),)
0021                 CROSS_COMPILE := $(call cc-cross-prefix, \
0022                         m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
0023         endif
0024 endif
0025 
0026 #
0027 #       Enable processor type. Ordering of these is important - we want to
0028 #       use the minimum processor type of the range we support. The logic
0029 #       for 680x0 will only allow use of the -m68060 or -m68040 if no other
0030 #       680x0 type is specified - and no option is specified for 68030 or
0031 #       68020. The other m68k/ColdFire types always specify some type of
0032 #       compiler cpu type flag.
0033 #
0034 ifndef CONFIG_M68040
0035 cpuflags-$(CONFIG_M68060)       := -m68060
0036 endif
0037 ifndef CONFIG_M68060
0038 cpuflags-$(CONFIG_M68040)       := -m68040
0039 endif
0040 cpuflags-$(CONFIG_M68030)       :=
0041 cpuflags-$(CONFIG_M68020)       :=
0042 cpuflags-$(CONFIG_M68000)       := -m68000
0043 cpuflags-$(CONFIG_M5441x)       := $(call cc-option,-mcpu=54455,-mcfv4e)
0044 cpuflags-$(CONFIG_M54xx)        := $(call cc-option,-mcpu=5475,-m5200)
0045 cpuflags-$(CONFIG_M5407)        := $(call cc-option,-mcpu=5407,-m5200)
0046 cpuflags-$(CONFIG_M532x)        := $(call cc-option,-mcpu=532x,-m5307)
0047 cpuflags-$(CONFIG_M537x)        := $(call cc-option,-mcpu=537x,-m5307)
0048 cpuflags-$(CONFIG_M5307)        := $(call cc-option,-mcpu=5307,-m5200)
0049 cpuflags-$(CONFIG_M528x)        := $(call cc-option,-mcpu=528x,-m5307)
0050 cpuflags-$(CONFIG_M5275)        := $(call cc-option,-mcpu=5275,-m5307)
0051 cpuflags-$(CONFIG_M5272)        := $(call cc-option,-mcpu=5272,-m5307)
0052 cpuflags-$(CONFIG_M5271)        := $(call cc-option,-mcpu=5271,-m5307)
0053 cpuflags-$(CONFIG_M523x)        := $(call cc-option,-mcpu=523x,-m5307)
0054 cpuflags-$(CONFIG_M525x)        := $(call cc-option,-mcpu=5253,-m5200)
0055 cpuflags-$(CONFIG_M5249)        := $(call cc-option,-mcpu=5249,-m5200)
0056 cpuflags-$(CONFIG_M520x)        := $(call cc-option,-mcpu=5208,-m5200)
0057 cpuflags-$(CONFIG_M5206e)       := $(call cc-option,-mcpu=5206e,-m5200)
0058 cpuflags-$(CONFIG_M5206)        := $(call cc-option,-mcpu=5206,-m5200)
0059 
0060 KBUILD_AFLAGS += $(cpuflags-y)
0061 KBUILD_CFLAGS += $(cpuflags-y) -pipe
0062 ifdef CONFIG_MMU
0063 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
0064 KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
0065 else
0066 # we can use a m68k-linux-gcc toolchain with these in place
0067 KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
0068 KBUILD_CFLAGS += -D__uClinux__
0069 KBUILD_AFLAGS += -D__uClinux__
0070 endif
0071 
0072 LDFLAGS := -m m68kelf
0073 KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
0074 
0075 ifdef CONFIG_SUN3
0076 LDFLAGS_vmlinux = -N
0077 endif
0078 
0079 CHECKFLAGS += -D__mc68000__
0080 
0081 
0082 ifdef CONFIG_KGDB
0083 # If configured for kgdb support, include debugging infos and keep the
0084 # frame pointer
0085 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
0086 endif
0087 
0088 #
0089 # Select the assembler head startup code. Order is important. The default
0090 # head code is first, processor specific selections can override it after.
0091 #
0092 head-y                          := arch/m68k/kernel/head.o
0093 head-$(CONFIG_SUN3)             := arch/m68k/kernel/sun3-head.o
0094 head-$(CONFIG_M68000)           := arch/m68k/68000/head.o
0095 head-$(CONFIG_COLDFIRE)         := arch/m68k/coldfire/head.o
0096 
0097 core-y                          += arch/m68k/kernel/    arch/m68k/mm/
0098 libs-y                          += arch/m68k/lib/
0099 
0100 core-$(CONFIG_Q40)              += arch/m68k/q40/
0101 core-$(CONFIG_AMIGA)            += arch/m68k/amiga/
0102 core-$(CONFIG_ATARI)            += arch/m68k/atari/
0103 core-$(CONFIG_MAC)              += arch/m68k/mac/
0104 core-$(CONFIG_HP300)            += arch/m68k/hp300/
0105 core-$(CONFIG_APOLLO)           += arch/m68k/apollo/
0106 core-$(CONFIG_MVME147)          += arch/m68k/mvme147/
0107 core-$(CONFIG_MVME16x)          += arch/m68k/mvme16x/
0108 core-$(CONFIG_BVME6000)         += arch/m68k/bvme6000/
0109 core-$(CONFIG_SUN3X)            += arch/m68k/sun3x/     arch/m68k/sun3/
0110 core-$(CONFIG_SUN3)             += arch/m68k/sun3/      arch/m68k/sun3/prom/
0111 core-$(CONFIG_NATFEAT)          += arch/m68k/emu/
0112 core-$(CONFIG_M68040)           += arch/m68k/fpsp040/
0113 core-$(CONFIG_M68060)           += arch/m68k/ifpsp060/
0114 core-$(CONFIG_M68KFPU_EMU)      += arch/m68k/math-emu/
0115 core-$(CONFIG_M68000)           += arch/m68k/68000/
0116 core-$(CONFIG_COLDFIRE)         += arch/m68k/coldfire/
0117 
0118 
0119 all:    zImage
0120 
0121 lilo:   vmlinux
0122         if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
0123         if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
0124         cat vmlinux > $(INSTALL_PATH)/vmlinux
0125         cp System.map $(INSTALL_PATH)/System.map
0126         if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
0127 
0128 zImage compressed: vmlinux.gz
0129 
0130 vmlinux.gz: vmlinux
0131 
0132 ifndef CONFIG_KGDB
0133         cp vmlinux vmlinux.tmp
0134         $(STRIP) vmlinux.tmp
0135         gzip -9c vmlinux.tmp >vmlinux.gz
0136         rm vmlinux.tmp
0137 else
0138         gzip -9c vmlinux >vmlinux.gz
0139 endif
0140 
0141 bzImage: vmlinux.bz2
0142 
0143 vmlinux.bz2: vmlinux
0144 
0145 ifndef CONFIG_KGDB
0146         cp vmlinux vmlinux.tmp
0147         $(STRIP) vmlinux.tmp
0148         bzip2 -1c vmlinux.tmp >vmlinux.bz2
0149         rm vmlinux.tmp
0150 else
0151         bzip2 -1c vmlinux >vmlinux.bz2
0152 endif
0153 
0154 archclean:
0155         rm -f vmlinux.gz vmlinux.bz2
0156 
0157 install:
0158         sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"