2 # This file is subject to the terms and conditions of the GNU General Public
3 # License. See the file "COPYING" in the main directory of this archive
6 # Copyright (C) 2000, 2001 Paolo Alberelli
7 # Copyright (C) 2003, 2004 Paul Mundt
9 # This file is included by the global makefile so that you can add your own
10 # architecture-specific flags and dependencies. Remember to do have actions
11 # for "archclean" and "archdep" for cleaning up and making dependencies for
16 cpu-$(CONFIG_LITTLE_ENDIAN) := -ml
18 cpu-$(CONFIG_CPU_SH5) += -m5-32media-nofpu
20 ifdef CONFIG_LITTLE_ENDIAN
21 LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64'
22 LDFLAGS += -EL -mshlelf32_linux
24 LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4'
25 LDFLAGS += -EB -mshelf32_linux
28 # No requirements for endianess support from AFLAGS, 'as' always run through gcc
29 AFLAGS += -m5 -isa=sh64 -traditional
32 LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
33 --defsym phys_stext_shmedia=phys_stext+1 \
36 OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S
39 # arch/sh64/defconfig never had any hope of being
40 # frequently updated, so use one that does
42 KBUILD_DEFCONFIG := cayman_defconfig
45 LINKFLAGS += -Ttext $(word 1,$(LOADADDR))
48 machine-$(CONFIG_SH_CAYMAN) := cayman
49 machine-$(CONFIG_SH_SIMULATOR) := sim
50 machine-$(CONFIG_SH_HARP) := harp
51 machine-$(CONFIG_SH_ROMRAM) := romram
53 head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
55 core-y += arch/sh64/kernel/ arch/sh64/mm/
58 core-y += arch/sh64/mach-$(machine-y)/
61 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
62 libs-y += arch/$(ARCH)/lib/ $(LIBGCC)
64 drivers-$(CONFIG_OPROFILE) += arch/sh64/oprofile/
66 boot := arch/$(ARCH)/boot
69 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
74 $(Q)$(MAKE) $(clean)=$(boot)
76 prepare: arch/$(ARCH)/lib/syscalltab.h
78 define filechk_gen-syscalltab
81 echo " * DO NOT MODIFY."; \
83 echo " * This file was generated by arch/$(ARCH)/Makefile"; \
84 echo " * Any changes will be reverted at build time."; \
87 echo "#ifndef __SYSCALLTAB_H"; \
88 echo "#define __SYSCALLTAB_H"; \
90 echo "#include <linux/kernel.h>"; \
92 echo "struct syscall_info {"; \
93 echo " const char *name;"; \
94 echo "} syscall_info_table[] = {"; \
95 sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
96 s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
99 echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)"; \
101 echo "#endif /* __SYSCALLTAB_H */" )
104 arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S
105 $(call filechk,gen-syscalltab)
107 CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h
110 @echo ' zImage - Compressed kernel image (arch/sh64/boot/zImage)'