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. |
| 5 | # --------------------------------------------------------------------------- |
| 6 | # kallsyms: Find all symbols in vmlinux |
David Woodhouse | 556b0f5 | 2009-01-10 14:53:15 +0000 | [diff] [blame] | 7 | # conmakehash: Create chartable |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | # conmakehash: Create arrays for initializing the kernel console tables |
| 9 | |
H. Peter Anvin | 6520fe5 | 2012-05-08 21:22:24 +0300 | [diff] [blame] | 10 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include |
| 11 | |
Masahiro Yamada | c417fbc | 2018-06-26 01:40:23 +0900 | [diff] [blame] | 12 | hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | hostprogs-$(CONFIG_KALLSYMS) += kallsyms |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | hostprogs-$(CONFIG_VT) += conmakehash |
Steven Rostedt | 72441cb | 2010-10-13 17:12:30 -0400 | [diff] [blame] | 15 | hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount |
Shile Zhang | 1091670 | 2019-12-04 08:46:31 +0800 | [diff] [blame] | 16 | hostprogs-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable |
David Howells | 4520c6a | 2012-09-21 23:31:13 +0100 | [diff] [blame] | 17 | hostprogs-$(CONFIG_ASN1) += asn1_compiler |
Thiago Jung Bauermann | c8424e7 | 2019-07-04 15:57:34 -0300 | [diff] [blame] | 18 | hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file |
David Woodhouse | 770f2b9 | 2015-07-20 21:16:34 +0100 | [diff] [blame] | 19 | hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert |
Mehmet Kayaalp | c4c3610 | 2015-11-24 16:18:05 -0500 | [diff] [blame] | 20 | hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
Shile Zhang | 1091670 | 2019-12-04 08:46:31 +0800 | [diff] [blame] | 22 | HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include |
David Howells | 4520c6a | 2012-09-21 23:31:13 +0100 | [diff] [blame] | 23 | HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include |
Laura Abbott | 8377bd2 | 2018-07-09 17:46:01 -0700 | [diff] [blame] | 24 | HOSTLDLIBS_sign-file = -lcrypto |
| 25 | HOSTLDLIBS_extract-cert = -lcrypto |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | |
Shile Zhang | 57fa189 | 2019-12-04 08:46:32 +0800 | [diff] [blame^] | 27 | ifdef CONFIG_UNWINDER_ORC |
| 28 | ifeq ($(ARCH),x86_64) |
| 29 | ARCH := x86 |
| 30 | endif |
| 31 | HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include |
| 32 | HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED |
| 33 | HOSTLDLIBS_sorttable = -lpthread |
| 34 | endif |
| 35 | |
Ross Biro | f2443ab | 2006-09-30 23:27:25 -0700 | [diff] [blame] | 36 | always := $(hostprogs-y) $(hostprogs-m) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
Sam Ravnborg | 07aea3a | 2006-07-23 20:47:50 +0200 | [diff] [blame] | 38 | # The following hostprogs-y programs are only build on demand |
Jonathan Corbet | 52b3f23 | 2017-06-23 14:17:38 -0600 | [diff] [blame] | 39 | hostprogs-y += unifdef |
Sam Ravnborg | 07aea3a | 2006-07-23 20:47:50 +0200 | [diff] [blame] | 40 | |
Masahiro Yamada | ce2fd53a | 2018-11-29 12:56:31 +0900 | [diff] [blame] | 41 | subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
Serge E. Hallyn | 93c06cb | 2008-08-26 14:47:57 -0500 | [diff] [blame] | 43 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
| 45 | # Let clean descend into subdirs |
Masahiro Yamada | 46a63d4 | 2019-08-21 16:02:02 +0900 | [diff] [blame] | 46 | subdir- += basic dtc gdb kconfig mod |