Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 ###
0003 # scripts contains sources for various helper programs used throughout
0004 # the kernel for the build process.
0005 
0006 hostprogs-always-$(CONFIG_BUILD_BIN2C)                  += bin2c
0007 hostprogs-always-$(CONFIG_KALLSYMS)                     += kallsyms
0008 hostprogs-always-$(BUILD_C_RECORDMCOUNT)                += recordmcount
0009 hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT)         += sorttable
0010 hostprogs-always-$(CONFIG_ASN1)                         += asn1_compiler
0011 hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT)            += sign-file
0012 hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE)     += insert-sys-cert
0013 
0014 HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
0015 HOSTLDLIBS_sorttable = -lpthread 
0016 HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
0017 HOSTCFLAGS_sign-file.o = $(shell $(HOSTPKG_CONFIG) --cflags libcrypto 2> /dev/null) 
0018 HOSTLDLIBS_sign-file = $(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto)
0019 
0020 ifdef CONFIG_UNWINDER_ORC
0021 ifeq ($(ARCH),x86_64)
0022 ARCH := x86
0023 endif
0024 HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
0025 HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED 
0026 endif
0027 
0028 ifdef CONFIG_BUILDTIME_MCOUNT_SORT
0029 HOSTCFLAGS_sorttable.o += -DMCOUNT_SORT_ENABLED
0030 endif
0031 
0032 # The following programs are only built on demand
0033 hostprogs += unifdef
0034 
0035 # The module linker script is preprocessed on demand
0036 targets += module.lds
0037 
0038 subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
0039 subdir-$(CONFIG_MODVERSIONS) += genksyms
0040 subdir-$(CONFIG_SECURITY_SELINUX) += selinux
0041 
0042 # Let clean descend into subdirs
0043 subdir- += basic dtc gdb kconfig mod