Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | ### |
| 3 | # scripts contains sources for various helper programs used throughout |
| 4 | # the kernel for the build process. |
H. Peter Anvin | 6520fe5 | 2012-05-08 21:22:24 +0300 | [diff] [blame] | 5 | |
Masahiro Yamada | faabed2 | 2020-08-01 21:27:18 +0900 | [diff] [blame] | 6 | hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c |
| 7 | hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms |
| 8 | hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount |
| 9 | hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable |
| 10 | hostprogs-always-$(CONFIG_ASN1) += asn1_compiler |
| 11 | hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file |
| 12 | hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert |
| 13 | hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
Shile Zhang | 1091670 | 2019-12-04 08:46:31 +0800 | [diff] [blame] | 15 | HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include |
David Howells | 4520c6a | 2012-09-21 23:31:13 +0100 | [diff] [blame] | 16 | HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include |
Laura Abbott | 8377bd2 | 2018-07-09 17:46:01 -0700 | [diff] [blame] | 17 | HOSTLDLIBS_sign-file = -lcrypto |
| 18 | HOSTLDLIBS_extract-cert = -lcrypto |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Shile Zhang | 57fa189 | 2019-12-04 08:46:32 +0800 | [diff] [blame] | 20 | ifdef CONFIG_UNWINDER_ORC |
| 21 | ifeq ($(ARCH),x86_64) |
| 22 | ARCH := x86 |
| 23 | endif |
| 24 | HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include |
| 25 | HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED |
| 26 | HOSTLDLIBS_sorttable = -lpthread |
| 27 | endif |
| 28 | |
Masahiro Yamada | 5f2fb52 | 2020-02-02 01:49:24 +0900 | [diff] [blame] | 29 | # The following programs are only built on demand |
| 30 | hostprogs += unifdef |
Sam Ravnborg | 07aea3a | 2006-07-23 20:47:50 +0200 | [diff] [blame] | 31 | |
Masahiro Yamada | ce2fd53a | 2018-11-29 12:56:31 +0900 | [diff] [blame] | 32 | subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
Serge E. Hallyn | 93c06cb | 2008-08-26 14:47:57 -0500 | [diff] [blame] | 34 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
| 36 | # Let clean descend into subdirs |
Masahiro Yamada | 46a63d4 | 2019-08-21 16:02:02 +0900 | [diff] [blame] | 37 | subdir- += basic dtc gdb kconfig mod |