blob: 9116feaacee2af4aeb6ab7037b68439e4bd1e2a8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001###
2# scripts contains sources for various helper programs used throughout
3# the kernel for the build process.
4# ---------------------------------------------------------------------------
5# kallsyms: Find all symbols in vmlinux
6# pnmttologo: Convert pnm files to logo files
David Woodhouse556b0f52009-01-10 14:53:15 +00007# conmakehash: Create chartable
Linus Torvalds1da177e2005-04-16 15:20:36 -07008# conmakehash: Create arrays for initializing the kernel console tables
Peter Foleybffd2022011-05-02 22:48:03 +02009# docproc: Used in Documentation/DocBook
Ben Hutchingsb479bfd2015-09-28 01:09:52 +010010# check-lc_ctype: Used in Documentation/DocBook
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
H. Peter Anvin6520fe52012-05-08 21:22:24 +030012HOST_EXTRACFLAGS += -I$(srctree)/tools/include
13
Rolf Eike Beerafba2aa2021-03-04 08:25:01 +010014CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
15CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
16
Linus Torvalds1da177e2005-04-16 15:20:36 -070017hostprogs-$(CONFIG_KALLSYMS) += kallsyms
18hostprogs-$(CONFIG_LOGO) += pnmtologo
19hostprogs-$(CONFIG_VT) += conmakehash
Steven Rostedt72441cb2010-10-13 17:12:30 -040020hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
David Daneya79f2482012-04-19 14:59:55 -070021hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable
David Howells4520c6a2012-09-21 23:31:13 +010022hostprogs-$(CONFIG_ASN1) += asn1_compiler
David Woodhouse770f2b92015-07-20 21:16:34 +010023hostprogs-$(CONFIG_MODULE_SIG) += sign-file
24hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
Mehmet Kayaalpc4c36102015-11-24 16:18:05 -050025hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
David Daneyd59a1682012-04-24 11:23:14 -070027HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
David Howells4520c6a2012-09-21 23:31:13 +010028HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
Rolf Eike Beer0073d6f2021-03-04 08:26:28 +010029HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
Rolf Eike Beerafba2aa2021-03-04 08:25:01 +010030HOSTLOADLIBES_sign-file = $(CRYPTO_LIBS)
31HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
32HOSTLOADLIBES_extract-cert = $(CRYPTO_LIBS)
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
Ross Birof2443ab2006-09-30 23:27:25 -070034always := $(hostprogs-y) $(hostprogs-m)
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Sam Ravnborg07aea3a2006-07-23 20:47:50 +020036# The following hostprogs-y programs are only build on demand
Ben Hutchingsb479bfd2015-09-28 01:09:52 +010037hostprogs-y += unifdef docproc check-lc_ctype
Sam Ravnborg07aea3a2006-07-23 20:47:50 +020038
Peter Foleybffd2022011-05-02 22:48:03 +020039# These targets are used internally to avoid "is up to date" messages
Ben Hutchingsb479bfd2015-09-28 01:09:52 +010040PHONY += build_unifdef build_docproc build_check-lc_ctype
Masahiro Yamadabfdfaea2014-01-20 14:08:08 +090041build_unifdef: $(obj)/unifdef
Mike Waychisone1b702c2011-03-14 23:34:25 -070042 @:
Masahiro Yamadabfdfaea2014-01-20 14:08:08 +090043build_docproc: $(obj)/docproc
Peter Foleybffd2022011-05-02 22:48:03 +020044 @:
Ben Hutchingsb479bfd2015-09-28 01:09:52 +010045build_check-lc_ctype: $(obj)/check-lc_ctype
46 @:
Mike Waychisone1b702c2011-03-14 23:34:25 -070047
Linus Torvalds1da177e2005-04-16 15:20:36 -070048subdir-$(CONFIG_MODVERSIONS) += genksyms
Sam Ravnborg12715d22006-08-08 20:43:39 +020049subdir-y += mod
Serge E. Hallyn93c06cb2008-08-26 14:47:57 -050050subdir-$(CONFIG_SECURITY_SELINUX) += selinux
David Gibson9fffb552009-04-30 15:25:53 +100051subdir-$(CONFIG_DTC) += dtc
Jan Kiszka3ee7b3f2015-02-17 13:46:36 -080052subdir-$(CONFIG_GDB_SCRIPTS) += gdb
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54# Let clean descend into subdirs
Emese Revfy6b90bd42016-05-24 00:09:38 +020055subdir- += basic kconfig package gcc-plugins