blob: 7491241e3a0d088bf16f361d67446164bf2de4a2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002###
3# scripts contains sources for various helper programs used throughout
4# the kernel for the build process.
5# ---------------------------------------------------------------------------
6# kallsyms: Find all symbols in vmlinux
David Woodhouse556b0f52009-01-10 14:53:15 +00007# conmakehash: Create chartable
Linus Torvalds1da177e2005-04-16 15:20:36 -07008# conmakehash: Create arrays for initializing the kernel console tables
9
H. Peter Anvin6520fe52012-05-08 21:22:24 +030010HOST_EXTRACFLAGS += -I$(srctree)/tools/include
11
Masahiro Yamadac417fbc2018-06-26 01:40:23 +090012hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
Linus Torvalds1da177e2005-04-16 15:20:36 -070013hostprogs-$(CONFIG_KALLSYMS) += kallsyms
Linus Torvalds1da177e2005-04-16 15:20:36 -070014hostprogs-$(CONFIG_VT) += conmakehash
Steven Rostedt72441cb2010-10-13 17:12:30 -040015hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
Shile Zhang10916702019-12-04 08:46:31 +080016hostprogs-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
David Howells4520c6a2012-09-21 23:31:13 +010017hostprogs-$(CONFIG_ASN1) += asn1_compiler
Thiago Jung Bauermannc8424e72019-07-04 15:57:34 -030018hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
David Woodhouse770f2b92015-07-20 21:16:34 +010019hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050020hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
Shile Zhang10916702019-12-04 08:46:31 +080022HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
David Howells4520c6a2012-09-21 23:31:13 +010023HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
Laura Abbott8377bd22018-07-09 17:46:01 -070024HOSTLDLIBS_sign-file = -lcrypto
25HOSTLDLIBS_extract-cert = -lcrypto
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
Ross Birof2443ab2006-09-30 23:27:25 -070027always := $(hostprogs-y) $(hostprogs-m)
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Sam Ravnborg07aea3a2006-07-23 20:47:50 +020029# The following hostprogs-y programs are only build on demand
Jonathan Corbet52b3f232017-06-23 14:17:38 -060030hostprogs-y += unifdef
Sam Ravnborg07aea3a2006-07-23 20:47:50 +020031
Masahiro Yamadace2fd53a2018-11-29 12:56:31 +090032subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
Linus Torvalds1da177e2005-04-16 15:20:36 -070033subdir-$(CONFIG_MODVERSIONS) += genksyms
Serge E. Hallyn93c06cb2008-08-26 14:47:57 -050034subdir-$(CONFIG_SECURITY_SELINUX) += selinux
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36# Let clean descend into subdirs
Masahiro Yamada46a63d42019-08-21 16:02:02 +090037subdir- += basic dtc gdb kconfig mod