1# 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 13CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) 14CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null) 15 16hostprogs-$(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 23hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file 24hostprogs-$(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 29HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS) 30HOSTLDLIBS_sign-file = $(CRYPTO_LIBS) 31HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS) 32HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS) 33 34always := $(hostprogs-y) $(hostprogs-m) 35 36# The following hostprogs-y programs are only build on demand 37hostprogs-y += unifdef 38 39subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins 40subdir-$(CONFIG_MODVERSIONS) += genksyms 41subdir-$(CONFIG_SECURITY_SELINUX) += selinux 42 43# Let clean descend into subdirs 44subdir- += basic dtc gdb kconfig mod 45