aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/Makefile
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-21 08:28:28 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:54 -0500
commitd088f323574ea932a9bfc65302120e1526131887 (patch)
treebe72db6c227503b37ad0f668c854cfb5e924e844 /arch/sh/Makefile
parentc2f1755becdc7c78ca07a516d358d9fa7a0a2707 (diff)
sh: Consolidate sh/sh64 Makefiles.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r--arch/sh/Makefile50
1 files changed, 44 insertions, 6 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 3825e226dd64..afe4e6343248 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -139,6 +139,12 @@ core-y += $(addprefix arch/sh/boards/, \
139 $(filter-out ., $(patsubst %,%/,$(machdir-y)))) 139 $(filter-out ., $(patsubst %,%/,$(machdir-y))))
140endif 140endif
141 141
142# SH-5 mach types
143# XXX.. to be reconciled with machdir-y later.
144core-$(CONFIG_SH_SIMULATOR) += arch/sh/mach-sim/
145core-$(CONFIG_SH_CAYMAN) += arch/sh/mach-cayman/
146core-$(CONFIG_SH_HARP) += arch/sh/mach-harp/
147
142# Companion chips 148# Companion chips
143core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/ 149core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/
144core-$(CONFIG_MFD_SM501) += arch/sh/cchips/voyagergx/ 150core-$(CONFIG_MFD_SM501) += arch/sh/cchips/voyagergx/
@@ -203,9 +209,8 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
203 done 209 done
204 @touch $@ 210 @touch $@
205 211
206archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools
207
208PHONY += maketools FORCE 212PHONY += maketools FORCE
213
209maketools: include/linux/version.h FORCE 214maketools: include/linux/version.h FORCE
210 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 215 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
211 216
@@ -216,16 +221,49 @@ zImage uImage uImage.srec vmlinux.srec: vmlinux
216 221
217compressed: zImage 222compressed: zImage
218 223
224archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \
225 arch/sh/lib64/syscalltab.h
226
219archclean: 227archclean:
220 $(Q)$(MAKE) $(clean)=$(boot) 228 $(Q)$(MAKE) $(clean)=$(boot)
221 229
222CLEAN_FILES += include/asm-sh/machtypes.h \
223 include/asm-sh/cpu include/asm-sh/.cpu \
224 include/asm-sh/mach include/asm-sh/.mach
225
226define archhelp 230define archhelp
227 @echo '* zImage - Compressed kernel image' 231 @echo '* zImage - Compressed kernel image'
228 @echo ' vmlinux.srec - Create an ELF S-record' 232 @echo ' vmlinux.srec - Create an ELF S-record'
229 @echo ' uImage - Create a bootable image for U-Boot' 233 @echo ' uImage - Create a bootable image for U-Boot'
230 @echo ' uImage.srec - Create an S-record for U-Boot' 234 @echo ' uImage.srec - Create an S-record for U-Boot'
231endef 235endef
236
237define filechk_gen-syscalltab
238 (set -e; \
239 echo "/*"; \
240 echo " * DO NOT MODIFY."; \
241 echo " *"; \
242 echo " * This file was generated by arch/sh/Makefile"; \
243 echo " * Any changes will be reverted at build time."; \
244 echo " */"; \
245 echo ""; \
246 echo "#ifndef __SYSCALLTAB_H"; \
247 echo "#define __SYSCALLTAB_H"; \
248 echo ""; \
249 echo "#include <linux/kernel.h>"; \
250 echo ""; \
251 echo "struct syscall_info {"; \
252 echo " const char *name;"; \
253 echo "} syscall_info_table[] = {"; \
254 sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
255 s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
256 echo "};"; \
257 echo ""; \
258 echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)";\
259 echo ""; \
260 echo "#endif /* __SYSCALLTAB_H */" )
261endef
262
263arch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S
264 $(call filechk,gen-syscalltab)
265
266CLEAN_FILES += arch/sh/lib64/syscalltab.h \
267 include/asm-sh/machtypes.h \
268 include/asm-sh/cpu include/asm-sh/.cpu \
269 include/asm-sh/mach include/asm-sh/.mach