sh64: Kill off dead ROM-RAM and generic boards.
[linux-2.6] / arch / sh64 / Makefile
1 #
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
4 # for more details.
5 #
6 # Copyright (C) 2000, 2001  Paolo Alberelli
7 # Copyright (C) 2003, 2004  Paul Mundt
8 #
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
12 # this architecture
13 #
14
15 cpu-y                           := -mb
16 cpu-$(CONFIG_LITTLE_ENDIAN)     := -ml
17
18 cpu-$(CONFIG_CPU_SH5)           += -m5-32media-nofpu
19
20 ifdef CONFIG_LITTLE_ENDIAN
21 LDFLAGS_vmlinux         += --defsym 'jiffies=jiffies_64'
22 LDFLAGS                 += -EL  -mshlelf32_linux
23 else
24 LDFLAGS_vmlinux         += --defsym 'jiffies=jiffies_64+4'
25 LDFLAGS                 += -EB  -mshelf32_linux
26 endif
27
28 # No requirements for endianess support from AFLAGS, 'as' always run through gcc
29 CFLAGS          += $(cpu-y)
30
31 LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
32                   --defsym phys_stext_shmedia=phys_stext+1 \
33                   -e phys_stext_shmedia
34
35 OBJCOPYFLAGS    := -O binary -R .note -R .comment -R .stab -R .stabstr -S
36
37 #
38 # arch/sh64/defconfig never had any hope of being
39 # frequently updated, so use one that does
40 #
41 KBUILD_DEFCONFIG        := cayman_defconfig
42
43 ifdef LOADADDR
44 LINKFLAGS     += -Ttext $(word 1,$(LOADADDR))
45 endif
46
47 machine-$(CONFIG_SH_CAYMAN)     := cayman
48 machine-$(CONFIG_SH_SIMULATOR)  := sim
49 machine-$(CONFIG_SH_HARP)       := harp
50
51 head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
52
53 core-y  += arch/sh64/kernel/ arch/sh64/mm/
54
55 ifneq ($(machine-y),)
56 core-y  += arch/sh64/mach-$(machine-y)/
57 endif
58
59 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
60 libs-y  += arch/$(ARCH)/lib/ $(LIBGCC)
61
62 drivers-$(CONFIG_OPROFILE)      += arch/sh64/oprofile/
63
64 boot := arch/$(ARCH)/boot
65
66 zImage: vmlinux
67         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
68
69 compressed: zImage
70
71 archclean:
72         $(Q)$(MAKE) $(clean)=$(boot)
73
74 archprepare: arch/$(ARCH)/lib/syscalltab.h
75
76 define filechk_gen-syscalltab
77        (set -e; \
78         echo "/*"; \
79         echo " * DO NOT MODIFY."; \
80         echo " *"; \
81         echo " * This file was generated by arch/$(ARCH)/Makefile"; \
82         echo " * Any changes will be reverted at build time."; \
83         echo " */"; \
84         echo ""; \
85         echo "#ifndef __SYSCALLTAB_H"; \
86         echo "#define __SYSCALLTAB_H"; \
87         echo ""; \
88         echo "#include <linux/kernel.h>"; \
89         echo ""; \
90         echo "struct syscall_info {"; \
91         echo "  const char *name;"; \
92         echo "} syscall_info_table[] = {"; \
93         sed -e '/^.*\.long /!d;s//    { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
94                 s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
95         echo "};"; \
96         echo ""; \
97         echo "#define NUM_SYSCALL_INFO_ENTRIES  ARRAY_SIZE(syscall_info_table)"; \
98         echo ""; \
99         echo "#endif /* __SYSCALLTAB_H */" )
100 endef
101
102 arch/$(ARCH)/lib/syscalltab.h: arch/sh64/kernel/syscalls.S
103         $(call filechk,gen-syscalltab)
104
105 CLEAN_FILES += arch/$(ARCH)/lib/syscalltab.h
106
107 define archhelp
108         @echo '  zImage                    - Compressed kernel image (arch/sh64/boot/zImage)'
109 endef
110