Makefile revision ea0aac1e1327476d2f6a38f08145281237cf1b03
11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 2c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# arch/sh/Makefile 31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Copyright (C) 1999 Kaz Kojima 5b2d86a3fd9855380598c0c039e712a20086e119fPaul Mundt# Copyright (C) 2002 - 2008 Paul Mundt 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Copyright (C) 2002 M. R. Brown 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 8c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# This file is subject to the terms and conditions of the GNU General Public 9c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# License. See the file "COPYING" in the main directory of this archive 10c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# for more details. 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 12cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-y := any 13e5723e0eeb2dc16629e86d66785024ead9169000Paul Mundtisa-$(CONFIG_SH_DSP) := sh 14cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-$(CONFIG_CPU_SH2) := sh2 15e5723e0eeb2dc16629e86d66785024ead9169000Paul Mundtisa-$(CONFIG_CPU_SH2A) := sh2a 16cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-$(CONFIG_CPU_SH3) := sh3 17cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-$(CONFIG_CPU_SH4) := sh4 18cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-$(CONFIG_CPU_SH4A) := sh4a 19e5723e0eeb2dc16629e86d66785024ead9169000Paul Mundtisa-$(CONFIG_CPU_SH4AL_DSP) := sh4al 20c20c20047b1aa4ba6fc2bb4e9ab91402026c3e71Paul Mundtisa-$(CONFIG_CPU_SH5) := shmedia 21ddb72b02414228844ad46f7cbd42eccea01fb485Paul Mundt 22ddb72b02414228844ad46f7cbd42eccea01fb485Paul Mundtifeq ($(CONFIG_SUPERH32),y) 23cad8244840d1a148f638925758afd1cdf81fc839Paul Mundtisa-$(CONFIG_SH_DSP) := $(isa-y)-dsp 24ddb72b02414228844ad46f7cbd42eccea01fb485Paul Mundtisa-y := $(isa-y)-up 25ddb72b02414228844ad46f7cbd42eccea01fb485Paul Mundtendif 26cad8244840d1a148f638925758afd1cdf81fc839Paul Mundt 276240d92f2f2fb74094b66b3510733fa0a1e2631aPaul Mundtcflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,) 28aab1b16a61d653173b1c5f158c51ec08dd6605b0Paul Mundtcflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \ 296240d92f2f2fb74094b66b3510733fa0a1e2631aPaul Mundt $(call cc-option,-m2a-nofpu,) 306240d92f2f2fb74094b66b3510733fa0a1e2631aPaul Mundtcflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,) 316240d92f2f2fb74094b66b3510733fa0a1e2631aPaul Mundtcflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \ 321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(call cc-option,-mno-implicit-fp,-m4-nofpu) 33aab1b16a61d653173b1c5f158c51ec08dd6605b0Paul Mundtcflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \ 346240d92f2f2fb74094b66b3510733fa0a1e2631aPaul Mundt $(call cc-option,-m4a-nofpu,) 358bcc5c1c332af97ba731f99fda780a47911e476fPaul Mundtcflags-$(CONFIG_CPU_SH4AL_DSP) += $(call cc-option,-m4al,) 36c20c20047b1aa4ba6fc2bb4e9ab91402026c3e71Paul Mundtcflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,) 3753644087a607040a56d883df612b588814a56f11Paul Mundt 385dd614761f05f56b93c94541aa92e6449920516cPaul Mundtifeq ($(cflags-y),) 395dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# 405dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# In the case where we are stuck with a compiler that has been uselessly 415dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# restricted to a particular ISA, a favourite default of newer GCCs when 425dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# extensive multilib targets are not provided, ensure we get the best fit 435dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# regarding FP generation. This is intentionally stupid (albeit many 445dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# orders of magnitude less than GCC's default behaviour), as anything 455dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# with a large number of multilib targets better have been built 465dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# correctly for the target in mind. 475dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# 485dd614761f05f56b93c94541aa92e6449920516cPaul Mundtcflags-y += $(shell $(CC) $(KBUILD_CFLAGS) -print-multi-lib | \ 495dd614761f05f56b93c94541aa92e6449920516cPaul Mundt grep nofpu | sed q | sed -e 's/^/-/;s/;.*$$//') 505dd614761f05f56b93c94541aa92e6449920516cPaul Mundt# At this point, anything goes. 515dd614761f05f56b93c94541aa92e6449920516cPaul Mundtisaflags-y := $(call as-option,-Wa$(comma)-isa=any,) 525dd614761f05f56b93c94541aa92e6449920516cPaul Mundtelse 53da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# 54da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that 55da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# support it, while -Wa,-dsp by itself limits the range of usable opcodes 56da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# on certain CPU subtypes. Try the ISA variant first, and if that fails, 57da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# fall back on -Wa,-dsp for the old binutils versions. Even without DSP 58da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# opcodes, we always want the best ISA tuning the version of binutils 59da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# will provide. 60da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt# 61da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundtisaflags-y := $(call as-option,-Wa$(comma)-isa=$(isa-y),) 62da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt 63da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundtisaflags-$(CONFIG_SH_DSP) := \ 64da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt $(call as-option,-Wa$(comma)-isa=$(isa-y),-Wa$(comma)-dsp) 655dd614761f05f56b93c94541aa92e6449920516cPaul Mundtendif 665dd614761f05f56b93c94541aa92e6449920516cPaul Mundt 675dd614761f05f56b93c94541aa92e6449920516cPaul Mundtcflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb 685dd614761f05f56b93c94541aa92e6449920516cPaul Mundtcflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml 69da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundt 705dd614761f05f56b93c94541aa92e6449920516cPaul Mundtcflags-y += $(call cc-option,-mno-fdpic) 71da2f5f7bf4a39f9613fc04d7030cffb63e435e1dPaul Mundtcflags-y += $(isaflags-y) -ffreestanding 721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldscflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \ 741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') 751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 76c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul MundtOBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \ 77c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt -R .stab -R .stabstr -S 781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 79c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# Give the various platforms the opportunity to set default image types 801a30603233fdd104aba430fd8f3443160474b6bbPaul Mundtdefaultimage-$(CONFIG_SUPERH32) := zImage 811a30603233fdd104aba430fd8f3443160474b6bbPaul Mundtdefaultimage-$(CONFIG_SH_SH7785LCR) := uImage 82709420dd4e75083ee7920e61c2d0bcc3db9b7405Paul Mundtdefaultimage-$(CONFIG_SH_RSK7203) := uImage 83709420dd4e75083ee7920e61c2d0bcc3db9b7405Paul Mundtdefaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux 84709420dd4e75083ee7920e61c2d0bcc3db9b7405Paul Mundtdefaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux 85f36af73304555849985b1fb5c0821c1bfab3a5a0Paul Mundt 86c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# Set some sensible Kbuild defaults 87cfb81f361a3e73bb4eb7207a88f720e2f652dd63Paul MundtKBUILD_DEFCONFIG := shx3_defconfig 88c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul MundtKBUILD_IMAGE := $(defaultimage-y) 891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Choosing incompatible machines durings configuration will result in 921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# error messages during linking. 931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 94b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtifdef CONFIG_SUPERH32 9509558748464a9afafe2848a3ad4cfd509c9b0fb6Paul MundtUTS_MACHINE := sh 96b4db3aec8351c78df77bbd95f1951a4dd0246853Paul MundtLDFLAGS_vmlinux += -e _stext 97b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtelse 9809558748464a9afafe2848a3ad4cfd509c9b0fb6Paul MundtUTS_MACHINE := sh64 9936763b22bee56713057762bb0756e8075b5bb918Paul MundtLDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ 100b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundt --defsym phys_stext_shmedia=phys_stext+1 \ 101b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundt -e phys_stext_shmedia 102b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtendif 1031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN 1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64' 1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS += -EL 1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldselse 1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' 1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS += -EB 1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendif 1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1124c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-y := arch/sh/kernel/init_task.o 1134c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o 1144c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-$(CONFIG_SUPERH64) += arch/sh/kernel/head_64.o 1151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 116c8b5d9dcbc94ae5e7d9ed647246df4454d25332ePaul Mundtcore-y += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/ 1174b565680d16300acab0ff167e24f0ea289a6bd5dTakashi YOSHIIcore-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 1181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 119c8b5d9dcbc94ae5e7d9ed647246df4454d25332ePaul Mundt# Mach groups 120939a24a6df24649cea9fd0ff54fe71ee0dc1d61ePaul Mundtmachdir-$(CONFIG_SOLUTION_ENGINE) += mach-se 121da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_HP6XX) += mach-hp6xx 122da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_DREAMCAST) += mach-dreamcast 123da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH03) += mach-sh03 124da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SECUREEDGE5410) += mach-snapgear 125da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_RTS7751R2D) += mach-r2d 126da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh 127da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705 128da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander 129da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_MIGOR) += mach-migor 130da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 131da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_X3PROTO) += mach-x3proto 132da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp 133da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH4202_MICRODEV) += mach-microdev 134da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_LANDISK) += mach-landisk 135da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_TITAN) += mach-titan 136da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_LBOX_RE2) += mach-lboxre2 137da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_CAYMAN) += mach-cayman 138ea0aac1e1327476d2f6a38f08145281237cf1b03Paul Mundtmachdir-$(CONFIG_SH_RSK) += mach-rsk 13925f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundt 1401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsifneq ($(machdir-y),) 14125f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundtcore-y += $(addprefix arch/sh/boards/, \ 14225f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundt $(filter-out ., $(patsubst %,%/,$(machdir-y)))) 1431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendif 1441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1457639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundt# Common machine type headers. Not part of the arch/sh/boards/ hierarchy. 1467639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundtmachdir-y += mach-common 1477639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundt 1481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Companion chips 1494aafae27d0ce73f8507b8983b36006b734aa343aKristoffer Ericsoncore-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/ 1501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 15193dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 15293dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# CPU header paths 15393dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 15493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# These are ordered by optimization level. A CPU family that is a subset 15593dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# of another (ie, SH-2A / SH-2), is picked up first, with increasing 15693dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# levels of genericness if nothing more suitable is situated in the 15793dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# hierarchy. 15893dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 15993dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# As an example, in order of preference, SH-2A > SH-2 > common definitions. 16093dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 16193dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH2A) += cpu-sh2a 16293dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH2) += cpu-sh2 16393dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH3) += cpu-sh3 16493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH4) += cpu-sh4 16593dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH5) += cpu-sh5 16693dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-y += cpu-common # Must be last 1671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdrivers-y += arch/sh/drivers/ 1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdrivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ 1701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsboot := arch/sh/boot 1721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 17393dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcflags-y += $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \ 17493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt $(foreach d, $(machdir-y), -Iarch/sh/include/$(d)) 1751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 176f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_CFLAGS += -pipe $(cflags-y) 177f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_CPPFLAGS += $(cflags-y) 178f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_AFLAGS += $(cflags-y) 1791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 18049de935c107a53b0eba336efceb1dc3a8be64f87Adrian BunkLIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 18149de935c107a53b0eba336efceb1dc3a8be64f87Adrian Bunk 18249de935c107a53b0eba336efceb1dc3a8be64f87Adrian Bunklibs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) 1831aad54a99b6ce316c851ba99b2efe41998cfd37dPaul Mundtlibs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) $(LIBGCC) 18449de935c107a53b0eba336efceb1dc3a8be64f87Adrian Bunk 1854f1933620f57145212cdbb1ac6ce099eeeb21c5aPaul SmithPHONY += maketools FORCE 186d088f323574ea932a9bfc65302120e1526131887Paul Mundt 187cca6e6f5f473ec63e85c87dfc77279ce1ca114e6Sam Ravnborgmaketools: include/linux/version.h FORCE 1884385e12b291a6816987cb88a74fc116f520180f8Paul Mundt $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 1891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 190c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundtall: $(KBUILD_IMAGE) 1911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 192cf00e20444fc39fe37691ca32919061bf65527b0Paul MundtzImage uImage uImage.srec vmlinux.srec: vmlinux 1931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 1941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldscompressed: zImage 1961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 197f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul Mundtarchprepare: maketools arch/sh/lib64/syscalltab.h 198d088f323574ea932a9bfc65302120e1526131887Paul Mundt 1991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsarchclean: 2001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(Q)$(MAKE) $(clean)=$(boot) 2011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 2021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdefine archhelp 203cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo '* zImage - Compressed kernel image' 204cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' vmlinux.srec - Create an ELF S-record' 205cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' uImage - Create a bootable image for U-Boot' 206cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' uImage.srec - Create an S-record for U-Boot' 2071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendef 208d088f323574ea932a9bfc65302120e1526131887Paul Mundt 209d088f323574ea932a9bfc65302120e1526131887Paul Mundtdefine filechk_gen-syscalltab 210d088f323574ea932a9bfc65302120e1526131887Paul Mundt (set -e; \ 211d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "/*"; \ 212d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * DO NOT MODIFY."; \ 213d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " *"; \ 214d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * This file was generated by arch/sh/Makefile"; \ 215d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * Any changes will be reverted at build time."; \ 216d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " */"; \ 217d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 218d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#ifndef __SYSCALLTAB_H"; \ 219d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#define __SYSCALLTAB_H"; \ 220d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 221d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#include <linux/kernel.h>"; \ 222d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 223d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "struct syscall_info {"; \ 224d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " const char *name;"; \ 225d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "} syscall_info_table[] = {"; \ 226d088f323574ea932a9bfc65302120e1526131887Paul Mundt sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \ 227d088f323574ea932a9bfc65302120e1526131887Paul Mundt s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \ 228d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "};"; \ 229d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 230d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)";\ 231d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 232d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#endif /* __SYSCALLTAB_H */" ) 233d088f323574ea932a9bfc65302120e1526131887Paul Mundtendef 234d088f323574ea932a9bfc65302120e1526131887Paul Mundt 235d088f323574ea932a9bfc65302120e1526131887Paul Mundtarch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S 236d088f323574ea932a9bfc65302120e1526131887Paul Mundt $(call filechk,gen-syscalltab) 237d088f323574ea932a9bfc65302120e1526131887Paul Mundt 238d088f323574ea932a9bfc65302120e1526131887Paul MundtCLEAN_FILES += arch/sh/lib64/syscalltab.h \ 2394385e12b291a6816987cb88a74fc116f520180f8Paul Mundt include/asm-sh/machtypes.h 240