summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-08-13 12:42:05 +0200
committerThomas Heijligen <src@posteo.de>2022-09-12 07:13:04 +0000
commitc696220f97ebc9a72adcb2b56e70ba706a7d88f3 (patch)
tree1c40732a61a64d9d40ed02b4d03ca27a5345fa5f /meson.build
parentc8b23a0902790d0cf1420a2c4a090b9fa8810c30 (diff)
downloadflashrom-c696220f97ebc9a72adcb2b56e70ba706a7d88f3.tar.gz
flashrom-c696220f97ebc9a72adcb2b56e70ba706a7d88f3.tar.bz2
flashrom-c696220f97ebc9a72adcb2b56e70ba706a7d88f3.zip
meson: Build the classic cli / flashrom cli executable as feature
Provide the meson option `-Dclassic_cli=auto/enabled/disabled` to determine if the classic cli flashrom executable should be built. This is needed to support targets, like libpayload, which can only build libflashrom. Change-Id: If39981ad0b3281edd6fc7e220362d2938dddf814 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66705 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build28
1 files changed, 15 insertions, 13 deletions
diff --git a/meson.build b/meson.build
index 366ce18a4..634e62708 100644
--- a/meson.build
+++ b/meson.build
@@ -478,19 +478,21 @@ configure_file(
install_dir: join_paths(get_option('mandir'), 'man8'),
)
-executable(
- 'flashrom',
- files(
- 'cli_classic.c',
- 'cli_common.c',
- 'cli_output.c',
- ),
- c_args : cargs,
- include_directories : include_dir,
- install : true,
- install_dir : get_option('sbindir'),
- link_with : libflashrom.get_static_lib(), # flashrom needs internal symbols of libflashrom
-)
+if get_option('classic_cli').auto() or get_option('classic_cli').enabled()
+ executable(
+ 'flashrom',
+ files(
+ 'cli_classic.c',
+ 'cli_common.c',
+ 'cli_output.c',
+ ),
+ c_args : cargs,
+ include_directories : include_dir,
+ install : true,
+ install_dir : get_option('sbindir'),
+ link_with : libflashrom.get_static_lib(), # flashrom needs internal symbols of libflashrom
+ )
+endif
if get_option('ich_descriptors_tool').auto() or get_option('ich_descriptors_tool').enabled()
subdir('util/ich_descriptors_tool')