2005-04-17 02:20:36 +04:00
#
# m68k/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1994 by Hamish Macdonald
#
2008-07-17 23:16:14 +04:00
KBUILD_DEFCONFIG := multi_defconfig
2008-04-04 16:57:38 +04:00
2005-04-17 02:20:36 +04:00
# override top level makefile
AS += -m68020
LDFLAGS := -m m68kelf
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-28 19:33:09 +04:00
KBUILD_LDFLAGS_MODULE += -T $( srctree) /arch/m68k/kernel/module.lds
2008-02-05 09:30:17 +03:00
i f n e q ( $( SUBARCH ) , $( ARCH ) )
ifeq ( $( CROSS_COMPILE) ,)
CROSS_COMPILE := $( call cc-cross-prefix, \
m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
endif
2005-04-17 02:20:36 +04:00
e n d i f
i f d e f C O N F I G _ S U N 3
LDFLAGS_vmlinux = -N
e n d i f
CHECKFLAGS += -D__mc68000__
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
2005-04-17 02:20:36 +04:00
# enable processor switch if compiled only for a single cpu
i f n d e f C O N F I G _ M 6 8 0 2 0
i f n d e f C O N F I G _ M 6 8 0 3 0
i f n d e f C O N F I G _ M 6 8 0 6 0
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -m68040
2005-04-17 02:20:36 +04:00
e n d i f
i f n d e f C O N F I G _ M 6 8 0 4 0
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -m68060
2005-04-17 02:20:36 +04:00
e n d i f
e n d i f
e n d i f
i f d e f C O N F I G _ K G D B
# If configured for kgdb support, include debugging infos and keep the
# frame pointer
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS := $( subst -fomit-frame-pointer,,$( KBUILD_CFLAGS) ) -g
2005-04-17 02:20:36 +04:00
e n d i f
i f n d e f C O N F I G _ S U N 3
head-y := arch/m68k/kernel/head.o
e l s e
head-y := arch/m68k/kernel/sun3-head.o
e n d i f
core-y += arch/m68k/kernel/ arch/m68k/mm/
libs-y += arch/m68k/lib/
core-$(CONFIG_Q40) += arch/m68k/q40/
core-$(CONFIG_AMIGA) += arch/m68k/amiga/
core-$(CONFIG_ATARI) += arch/m68k/atari/
core-$(CONFIG_MAC) += arch/m68k/mac/
core-$(CONFIG_HP300) += arch/m68k/hp300/
core-$(CONFIG_APOLLO) += arch/m68k/apollo/
core-$(CONFIG_MVME147) += arch/m68k/mvme147/
core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
core-$(CONFIG_M68040) += arch/m68k/fpsp040/
core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
all : zImage
lilo : vmlinux
if [ -f $( INSTALL_PATH) /vmlinux ] ; then mv -f $( INSTALL_PATH) /vmlinux $( INSTALL_PATH) /vmlinux.old; fi
if [ -f $( INSTALL_PATH) /System.map ] ; then mv -f $( INSTALL_PATH) /System.map $( INSTALL_PATH) /System.old; fi
cat vmlinux > $( INSTALL_PATH) /vmlinux
cp System.map $( INSTALL_PATH) /System.map
if [ -x /sbin/lilo ] ; then /sbin/lilo; else /etc/lilo/install; fi
zImage compressed : vmlinux .gz
vmlinux.gz : vmlinux
i f n d e f C O N F I G _ K G D B
cp vmlinux vmlinux.tmp
$( STRIP) vmlinux.tmp
gzip -9c vmlinux.tmp >vmlinux.gz
rm vmlinux.tmp
e l s e
gzip -9c vmlinux >vmlinux.gz
e n d i f
bzImage : vmlinux .bz 2
vmlinux.bz2 : vmlinux
i f n d e f C O N F I G _ K G D B
cp vmlinux vmlinux.tmp
$( STRIP) vmlinux.tmp
bzip2 -1c vmlinux.tmp >vmlinux.bz2
rm vmlinux.tmp
e l s e
bzip2 -1c vmlinux >vmlinux.bz2
e n d i f
archclean :
rm -f vmlinux.gz vmlinux.bz2
2008-10-30 23:17:47 +03:00
install :
sh $( srctree) /arch/m68k/install.sh $( KERNELRELEASE) vmlinux.gz System.map " $( INSTALL_PATH) "