2005-04-17 02:20:36 +04:00
#
# frv/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) 2003, 2004 Red Hat Inc.
# - Written by David Howells <dhowells@redhat.com>
# - Derived from arch/m68knommu/Makefile,
# Copyright (c) 1999,2001 D. Jeff Dionne <jeff@lineo.ca>,
# Rt-Control Inc. / Lineo, Inc.
#
# Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uclinux.org>,
# Kenneth Albanowski <kjahds@kjahds.com>,
#
# Based on arch/m68k/Makefile:
# Copyright (C) 1994 by Hamish Macdonald
#
CCSPECS := $( shell $( CC) -v 2>& 1 | grep "^Reading specs from " | head -1 | cut -c20-)
CCDIR := $( strip $( patsubst %/specs,%,$( CCSPECS) ) )
CPUCLASS := fr400
# test for cross compiling
COMPILE_ARCH = $( shell uname -m)
i f d e f C O N F I G _ M M U
UTS_SYSNAME = -DUTS_SYSNAME= \" Linux\"
e l s e
UTS_SYSNAME = -DUTS_SYSNAME= \" uClinux\"
e n d i f
ARCHMODFLAGS += -G0 -mlong-calls
i f d e f C O N F I G _ G P R E L _ D A T A _ 8
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -G8
2005-04-17 02:20:36 +04:00
e l s e
i f d e f C O N F I G _ G P R E L _ D A T A _ 4
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -G4
2005-04-17 02:20:36 +04:00
e l s e
i f d e f C O N F I G _ G P R E L _ D A T A _ N O N E
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -G0
2005-04-17 02:20:36 +04:00
e n d i f
e n d i f
e n d i f
#LDFLAGS_vmlinux := -Map linkmap.txt
i f d e f C O N F I G _ G C _ S E C T I O N S
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -ffunction-sections -fdata-sections
2005-04-17 02:20:36 +04:00
LINKFLAGS += --gc-sections
e n d i f
i f n d e f C O N F I G _ F R A M E _ P O I N T E R
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -mno-linked-fp
2005-04-17 02:20:36 +04:00
e n d i f
i f d e f C O N F I G _ C P U _ F R 4 5 1 _ C O M P I L E
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -mcpu= fr450
2007-10-15 23:59:31 +04:00
KBUILD_AFLAGS += -mcpu= fr450
2005-04-17 02:20:36 +04:00
ASFLAGS += -mcpu= fr450
e l s e
i f d e f C O N F I G _ C P U _ F R 5 5 1 _ C O M P I L E
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -mcpu= fr550
2007-10-15 23:59:31 +04:00
KBUILD_AFLAGS += -mcpu= fr550
2005-04-17 02:20:36 +04:00
ASFLAGS += -mcpu= fr550
e l s e
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -mcpu= fr400
2007-10-15 23:59:31 +04:00
KBUILD_AFLAGS += -mcpu= fr400
2005-04-17 02:20:36 +04:00
ASFLAGS += -mcpu= fr400
e n d i f
e n d i f
# pretend the kernel is going to run on an FR400 with no media-fp unit
# - reserve CC3 for use with atomic ops
# - all the extra registers are dealt with only at context switch time
2007-10-15 00:21:35 +04:00
KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media
KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2
2007-10-15 23:59:31 +04:00
KBUILD_AFLAGS += -mno-fdpic
2005-04-17 02:20:36 +04:00
ASFLAGS += -mno-fdpic
# make sure the .S files get compiled with debug info
# and disable optimisations that are unhelpful whilst debugging
i f d e f C O N F I G _ D E B U G _ I N F O
2007-10-15 00:21:35 +04:00
#KBUILD_CFLAGS += -O1
2007-10-15 23:59:31 +04:00
KBUILD_AFLAGS += -Wa,--gdwarf2
2005-04-17 02:20:36 +04:00
ASFLAGS += -Wa,--gdwarf2
e n d i f
head-y := arch/frv/kernel/head.o arch/frv/kernel/init_task.o
core-y += arch/frv/kernel/ arch/frv/mm/
libs-y += arch/frv/lib/
core-$(CONFIG_MB93090_MB00) += arch/frv/mb93090-mb00/
all : Image
Image : vmlinux
$( Q) $( MAKE) $( build) = arch/frv/boot $@
bootstrap :
$( Q) $( MAKEBOOT) bootstrap
archclean :
2006-09-23 04:22:46 +04:00
$( Q) $( MAKE) $( clean) = arch/frv/boot
2005-04-17 02:20:36 +04:00
archdep : scripts /mkdep symlinks
2006-01-08 12:01:25 +03:00
$( Q) $( MAKE) $( build) = arch/frv/boot dep