2005-04-17 02:20:36 +04:00
#
# 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) 2000, 2001 Paolo Alberelli
# Copyright (C) 2003, 2004 Paul Mundt
#
# 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
#
cpu-y := -mb
cpu-$(CONFIG_LITTLE_ENDIAN) := -ml
cpu-$(CONFIG_CPU_SH5) += -m5-32media-nofpu
i f d e f C O N F I G _ L I T T L E _ E N D I A N
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64'
LDFLAGS += -EL -mshlelf32_linux
e l s e
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
LDFLAGS += -EB -mshelf32_linux
e n d i f
# No requirements for endianess support from AFLAGS, 'as' always run through gcc
AFLAGS += -m5 -isa= sh64 -traditional
CFLAGS += $( cpu-y)
LDFLAGS_vmlinux += --defsym phys_stext = _stext-$( CONFIG_CACHED_MEMORY_OFFSET) \
--defsym phys_stext_shmedia = phys_stext+1 \
-e phys_stext_shmedia
OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S
#
# arch/sh64/defconfig never had any hope of being
# frequently updated, so use one that does
#
KBUILD_DEFCONFIG := cayman_defconfig
i f d e f L O A D A D D R
LINKFLAGS += -Ttext $( word 1,$( LOADADDR) )
e n d i f
machine-$(CONFIG_SH_CAYMAN) := cayman
machine-$(CONFIG_SH_SIMULATOR) := sim
machine-$(CONFIG_SH_HARP) := harp
machine-$(CONFIG_SH_ROMRAM) := romram
head-y := arch/$( ARCH) /kernel/head.o arch/$( ARCH) /kernel/init_task.o
core-y += arch/sh64/kernel/ arch/sh64/mm/
i f n e q ( $( machine -y ) , )
core-y += arch/sh64/mach-$( machine-y) /
e n d i f
LIBGCC := $( shell $( CC) $( CFLAGS) -print-libgcc-file-name)
libs-y += arch/$( ARCH) /lib/ $( LIBGCC)
drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
boot := arch/$( ARCH) /boot
zImage : vmlinux
$( Q) $( MAKE) $( build) = $( boot) $( boot) /$@
compressed : zImage
archclean :
$( Q) $( MAKE) $( clean) = $( boot)
2005-09-12 00:30:22 +04:00
archprepare : arch /$( ARCH ) /lib /syscalltab .h
2005-04-17 02:20:36 +04:00
d e f i n e f i l e c h k _ g e n - s y s c a l l t a b
( set -e; \
echo "/*" ; \
echo " * DO NOT MODIFY." ; \
echo " *" ; \
echo " * This file was generated by arch/ $( ARCH) /Makefile " ; \
echo " * Any changes will be reverted at build time." ; \
echo " */" ; \
echo "" ; \
echo "#ifndef __SYSCALLTAB_H" ; \
echo "#define __SYSCALLTAB_H" ; \
echo "" ; \
echo "#include <linux/kernel.h>" ; \
echo "" ; \
echo "struct syscall_info {" ; \
echo " const char *name;" ; \
echo "} syscall_info_table[] = {" ; \
sed -e ' /^.*\. long /!d; s// { " /;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
s/[ \t ] *$$ //g; s/$$ /" },/;s/\(" \) sys_/\1 /g' ; \
echo "};" ; \
echo "" ; \
echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)" ; \
echo "" ; \
echo "#endif /* __SYSCALLTAB_H */" )
e n d e f
arch/$(ARCH)/lib/syscalltab.h : arch /sh 64/kernel /syscalls .S
$( call filechk,gen-syscalltab)
2005-09-09 22:28:49 +04:00
CLEAN_FILES += arch/$( ARCH) /lib/syscalltab.h
2005-04-17 02:20:36 +04:00
d e f i n e a r c h h e l p
@echo ' zImage - Compressed kernel image (arch/sh64/boot/zImage)'
e n d e f