diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-06-01 16:22:14 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-10 12:53:31 +0000 |
commit | 732aafdfecf084cc4277a344ac26b4ea5d0dd3be (patch) | |
tree | 18dfe94b37e785f6ce5a5b865164417f222357c9 /meson.build | |
parent | bf0396a60081a508ff088c7374311eb170d6dbf1 (diff) | |
download | flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.tar.gz flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.tar.bz2 flashrom-732aafdfecf084cc4277a344ac26b4ea5d0dd3be.zip |
CONFIG_DEFAULT_PROGRAMMER_NAME: Use programmer name instead of enum
CONFIG_DEFAULT_PROGRAMER_NAME replaces CONFIG_DEFAULT_PROGRAMMER.
It uses the name of the programmer for identification.
make CONFIG_DEFAULT_PROGRAMER_NAME=dummy and
meson -Ddefault_programmer_name=dummy will extend to
CONFIG_DEFAULT_PROGRAMER_NAME=&programmer_dummy in the code.
Change-Id: I976447787c6f6bfbdc0145d80d61e1ddcf97ac33
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 00170717d..6ebf3dcd0 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,8 @@ config_stlinkv3_spi = get_option('config_stlinkv3_spi') config_lspcon_i2c_spi = get_option('config_lspcon_i2c_spi') config_realtek_mst_i2c_spi = get_option('config_realtek_mst_i2c_spi') config_print_wiki= get_option('print_wiki') +config_default_programmer_name = get_option('default_programmer_name') +config_default_programmer_args = get_option('default_programmer_args') cargs = [] deps = [] @@ -436,6 +438,14 @@ if config_print_wiki cargs += '-DCONFIG_PRINT_WIKI=1' endif +if config_default_programmer_name != '' + cargs += '-DCONFIG_DEFAULT_PROGRAMMER_NAME=&programmer_' + config_default_programmer_name +else + cargs += '-DCONFIG_DEFAULT_PROGRAMMER_NAME=NULL' +endif + +cargs += '-DCONFIG_DEFAULT_PROGRAMMER_ARGS="' + config_default_programmer_args + '"' + # we can't just link_with libflashrom as we require all the internal symbols... executable( 'flashrom', @@ -450,9 +460,7 @@ executable( deps, ], c_args : [ - cargs, - '-DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID', - '-DCONFIG_DEFAULT_PROGRAMMER_ARGS=""', + cargs ], install : true, install_dir : sbindir, |