blob: b4b7d8b58cd68a6b709a97172c9bdb1cd3e175fa [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001# SPDX-License-Identifier: GPL-2.0
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
7# pnmttologo: Convert pnm files to logo files
8# conmakehash: Create chartable
9# conmakehash: Create arrays for initializing the kernel console tables
10
11HOST_EXTRACFLAGS += -I$(srctree)/tools/include
12
Olivier Deprez0e641232021-09-23 10:07:05 +020013CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
14CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
15
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000016hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
17hostprogs-$(CONFIG_KALLSYMS) += kallsyms
18hostprogs-$(CONFIG_LOGO) += pnmtologo
19hostprogs-$(CONFIG_VT) += conmakehash
20hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
21hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable
22hostprogs-$(CONFIG_ASN1) += asn1_compiler
David Brazdil0f672f62019-12-10 10:32:29 +000023hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000024hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
25hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
26
27HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
28HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
Olivier Deprez0e641232021-09-23 10:07:05 +020029HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
30HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
31HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
32HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000033
34always := $(hostprogs-y) $(hostprogs-m)
35
36# The following hostprogs-y programs are only build on demand
37hostprogs-y += unifdef
38
David Brazdil0f672f62019-12-10 10:32:29 +000039subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000040subdir-$(CONFIG_MODVERSIONS) += genksyms
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000041subdir-$(CONFIG_SECURITY_SELINUX) += selinux
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000042
43# Let clean descend into subdirs
David Brazdil0f672f62019-12-10 10:32:29 +000044subdir- += basic dtc gdb kconfig mod