Makefile revision ae68df5635a191c7edb75f5c1c1406353cb24a9f
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 826f5cd2bd59c3bbaf073a7a52fcdefded939bd306Paul Mundtdefaultimage-$(CONFIG_SH_RSK) := uImage 83ae68df5635a191c7edb75f5c1c1406353cb24a9fPaul Mundtdefaultimage-$(CONFIG_SH_URQUELL) := uImage 84709420dd4e75083ee7920e61c2d0bcc3db9b7405Paul Mundtdefaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux 85709420dd4e75083ee7920e61c2d0bcc3db9b7405Paul Mundtdefaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux 86f36af73304555849985b1fb5c0821c1bfab3a5a0Paul Mundt 87c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundt# Set some sensible Kbuild defaults 88cfb81f361a3e73bb4eb7207a88f720e2f652dd63Paul MundtKBUILD_DEFCONFIG := shx3_defconfig 89c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul MundtKBUILD_IMAGE := $(defaultimage-y) 901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Choosing incompatible machines durings configuration will result in 931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# error messages during linking. 941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# 95b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtifdef CONFIG_SUPERH32 9609558748464a9afafe2848a3ad4cfd509c9b0fb6Paul MundtUTS_MACHINE := sh 97b4db3aec8351c78df77bbd95f1951a4dd0246853Paul MundtLDFLAGS_vmlinux += -e _stext 98b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtelse 9909558748464a9afafe2848a3ad4cfd509c9b0fb6Paul MundtUTS_MACHINE := sh64 10036763b22bee56713057762bb0756e8075b5bb918Paul MundtLDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ 101b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundt --defsym phys_stext_shmedia=phys_stext+1 \ 102b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundt -e phys_stext_shmedia 103b4db3aec8351c78df77bbd95f1951a4dd0246853Paul Mundtendif 1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsifdef CONFIG_CPU_LITTLE_ENDIAN 1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64' 1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS += -EL 1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldselse 1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64+4' 1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsLDFLAGS += -EB 1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendif 1121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1134c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-y := arch/sh/kernel/init_task.o 1144c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o 1154c91d6b105af5ab3011158addbd23f038aee6a00Paul Mundthead-$(CONFIG_SUPERH64) += arch/sh/kernel/head_64.o 1161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 117c8b5d9dcbc94ae5e7d9ed647246df4454d25332ePaul Mundtcore-y += arch/sh/kernel/ arch/sh/mm/ arch/sh/boards/ 1184b565680d16300acab0ff167e24f0ea289a6bd5dTakashi YOSHIIcore-$(CONFIG_SH_FPU_EMU) += arch/sh/math-emu/ 1191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 120c8b5d9dcbc94ae5e7d9ed647246df4454d25332ePaul Mundt# Mach groups 121939a24a6df24649cea9fd0ff54fe71ee0dc1d61ePaul Mundtmachdir-$(CONFIG_SOLUTION_ENGINE) += mach-se 122da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_HP6XX) += mach-hp6xx 123da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_DREAMCAST) += mach-dreamcast 124da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH03) += mach-sh03 125da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SECUREEDGE5410) += mach-snapgear 126da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_RTS7751R2D) += mach-r2d 127da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_7751_SYSTEMH) += mach-systemh 128da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_EDOSK7705) += mach-edosk7705 129da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_HIGHLANDER) += mach-highlander 130da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_MIGOR) += mach-migor 131da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SDK7780) += mach-sdk7780 132da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_X3PROTO) += mach-x3proto 133da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH7763RDP) += mach-sh7763rdp 134da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_SH4202_MICRODEV) += mach-microdev 135da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_LANDISK) += mach-landisk 136da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_TITAN) += mach-titan 137da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_LBOX_RE2) += mach-lboxre2 138da2014a2b080e7f3024a4eb6917d47069ad9620bPaul Mundtmachdir-$(CONFIG_SH_CAYMAN) += mach-cayman 139ea0aac1e1327476d2f6a38f08145281237cf1b03Paul Mundtmachdir-$(CONFIG_SH_RSK) += mach-rsk 14025f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundt 1411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsifneq ($(machdir-y),) 14225f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundtcore-y += $(addprefix arch/sh/boards/, \ 14325f8151bdcdd62c6b879e3669a562c0d329eee4aPaul Mundt $(filter-out ., $(patsubst %,%/,$(machdir-y)))) 1441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendif 1451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1467639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundt# Common machine type headers. Not part of the arch/sh/boards/ hierarchy. 1477639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundtmachdir-y += mach-common 1487639a4541f7e7abb1295ff8ab39cc2f5842239aePaul Mundt 1491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds# Companion chips 1504aafae27d0ce73f8507b8983b36006b734aa343aKristoffer Ericsoncore-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/ 1511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 15293dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 15393dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# CPU header paths 15493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 15593dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# These are ordered by optimization level. A CPU family that is a subset 15693dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# of another (ie, SH-2A / SH-2), is picked up first, with increasing 15793dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# levels of genericness if nothing more suitable is situated in the 15893dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# hierarchy. 15993dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 16093dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# As an example, in order of preference, SH-2A > SH-2 > common definitions. 16193dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt# 16293dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH2A) += cpu-sh2a 16393dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH2) += cpu-sh2 16493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH3) += cpu-sh3 16593dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH4) += cpu-sh4 16693dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-$(CONFIG_CPU_SH5) += cpu-sh5 16793dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcpuincdir-y += cpu-common # Must be last 1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdrivers-y += arch/sh/drivers/ 1701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdrivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ 1711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsboot := arch/sh/boot 1731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 17493dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundtcflags-y += $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \ 17593dc544cf4892b9188d7d0d4946b0394020b4551Paul Mundt $(foreach d, $(machdir-y), -Iarch/sh/include/$(d)) 1761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 177f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_CFLAGS += -pipe $(cflags-y) 178f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_CPPFLAGS += $(cflags-y) 179f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul MundtKBUILD_AFLAGS += $(cflags-y) 1801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 18149de935c107a53b0eba336efceb1dc3a8be64f87Adrian Bunklibs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) 182180ae2037f5bc33b0597ddbb76d36b08a74a238aPaul Mundtlibs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) 18349de935c107a53b0eba336efceb1dc3a8be64f87Adrian Bunk 1844f1933620f57145212cdbb1ac6ce099eeeb21c5aPaul SmithPHONY += maketools FORCE 185d088f323574ea932a9bfc65302120e1526131887Paul Mundt 186cca6e6f5f473ec63e85c87dfc77279ce1ca114e6Sam Ravnborgmaketools: include/linux/version.h FORCE 1874385e12b291a6816987cb88a74fc116f520180f8Paul Mundt $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 1881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 189c2f1755becdc7c78ca07a516d358d9fa7a0a2707Paul Mundtall: $(KBUILD_IMAGE) 1901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 191cf00e20444fc39fe37691ca32919061bf65527b0Paul MundtzImage uImage uImage.srec vmlinux.srec: vmlinux 1921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 1931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldscompressed: zImage 1951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 196f15cbe6f1a4b4d9df59142fc8e4abb973302cf44Paul Mundtarchprepare: maketools arch/sh/lib64/syscalltab.h 197d088f323574ea932a9bfc65302120e1526131887Paul Mundt 1981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsarchclean: 1991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds $(Q)$(MAKE) $(clean)=$(boot) 2001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 2011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsdefine archhelp 202cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo '* zImage - Compressed kernel image' 203cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' vmlinux.srec - Create an ELF S-record' 204cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' uImage - Create a bootable image for U-Boot' 205cf00e20444fc39fe37691ca32919061bf65527b0Paul Mundt @echo ' uImage.srec - Create an S-record for U-Boot' 2061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsendef 207d088f323574ea932a9bfc65302120e1526131887Paul Mundt 208d088f323574ea932a9bfc65302120e1526131887Paul Mundtdefine filechk_gen-syscalltab 209d088f323574ea932a9bfc65302120e1526131887Paul Mundt (set -e; \ 210d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "/*"; \ 211d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * DO NOT MODIFY."; \ 212d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " *"; \ 213d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * This file was generated by arch/sh/Makefile"; \ 214d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " * Any changes will be reverted at build time."; \ 215d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " */"; \ 216d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 217d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#ifndef __SYSCALLTAB_H"; \ 218d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#define __SYSCALLTAB_H"; \ 219d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 220d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#include <linux/kernel.h>"; \ 221d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 222d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "struct syscall_info {"; \ 223d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo " const char *name;"; \ 224d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "} syscall_info_table[] = {"; \ 225d088f323574ea932a9bfc65302120e1526131887Paul Mundt sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \ 226d088f323574ea932a9bfc65302120e1526131887Paul Mundt s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \ 227d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "};"; \ 228d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 229d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)";\ 230d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo ""; \ 231d088f323574ea932a9bfc65302120e1526131887Paul Mundt echo "#endif /* __SYSCALLTAB_H */" ) 232d088f323574ea932a9bfc65302120e1526131887Paul Mundtendef 233d088f323574ea932a9bfc65302120e1526131887Paul Mundt 234d088f323574ea932a9bfc65302120e1526131887Paul Mundtarch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S 235d088f323574ea932a9bfc65302120e1526131887Paul Mundt $(call filechk,gen-syscalltab) 236d088f323574ea932a9bfc65302120e1526131887Paul Mundt 237d088f323574ea932a9bfc65302120e1526131887Paul MundtCLEAN_FILES += arch/sh/lib64/syscalltab.h \ 2384385e12b291a6816987cb88a74fc116f520180f8Paul Mundt include/asm-sh/machtypes.h 239