2017-11-01 15:07:57 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2005-04-16 15:20:36 -07:00
|
|
|
###
|
|
|
|
|
# scripts contains sources for various helper programs used throughout
|
|
|
|
|
# the kernel for the build process.
|
2012-05-08 21:22:24 +03:00
|
|
|
|
2020-08-01 21:27:18 +09:00
|
|
|
hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c
|
|
|
|
|
hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms
|
|
|
|
|
hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
|
|
|
|
|
hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
|
|
|
|
|
hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
|
|
|
|
|
hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
|
|
|
|
|
hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-12-04 08:46:31 +08:00
|
|
|
HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
|
2021-12-12 19:33:58 +08:00
|
|
|
HOSTLDLIBS_sorttable = -lpthread
|
2012-09-21 23:31:13 +01:00
|
|
|
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
|
2022-04-01 23:18:02 +00:00
|
|
|
HOSTCFLAGS_sign-file.o = $(shell $(HOSTPKG_CONFIG) --cflags libcrypto 2> /dev/null)
|
|
|
|
|
HOSTLDLIBS_sign-file = $(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto)
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-12-04 08:46:32 +08:00
|
|
|
ifdef CONFIG_UNWINDER_ORC
|
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
|
|
|
ARCH := x86
|
|
|
|
|
endif
|
|
|
|
|
HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
|
|
|
|
|
HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
|
2021-12-12 19:33:58 +08:00
|
|
|
endif
|
|
|
|
|
|
2022-01-25 09:19:10 -05:00
|
|
|
ifdef CONFIG_BUILDTIME_MCOUNT_SORT
|
2021-12-12 19:33:58 +08:00
|
|
|
HOSTCFLAGS_sorttable.o += -DMCOUNT_SORT_ENABLED
|
2019-12-04 08:46:32 +08:00
|
|
|
endif
|
|
|
|
|
|
2020-02-02 01:49:24 +09:00
|
|
|
# The following programs are only built on demand
|
|
|
|
|
hostprogs += unifdef
|
2006-07-23 20:47:50 +02:00
|
|
|
|
2020-09-08 13:27:08 +09:00
|
|
|
# The module linker script is preprocessed on demand
|
|
|
|
|
targets += module.lds
|
|
|
|
|
|
2018-11-29 12:56:31 +09:00
|
|
|
subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
|
2005-04-16 15:20:36 -07:00
|
|
|
subdir-$(CONFIG_MODVERSIONS) += genksyms
|
2008-08-26 14:47:57 -05:00
|
|
|
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
# Let clean descend into subdirs
|
2019-08-21 16:02:02 +09:00
|
|
|
subdir- += basic dtc gdb kconfig mod
|