From 265fcac1b64154b8419c469ded75ec77d6c87828 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Mon, 2 Jun 2014 00:12:23 +0000 Subject: Add default arguments for the default programmer (only) This code exists thanks to food for thought from Urja Rannikko. Corresponding to flashrom svn r1814. Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7f7aa92b..d3c1ba5e 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,11 @@ DOSLIBS_BASE ?= .. # evaluated below, namely those that enable/disable the various programmers). # Compilation will fail for unspecified values. CONFIG_DEFAULT_PROGRAMMER ?= PROGRAMMER_INVALID +# The following adds a default parameter for the default programmer set above (only). +CONFIG_DEFAULT_PROGRAMMER_ARGS ?= '' +# Example: compiling with +# make CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_SERPROG CONFIG_DEFAULT_PROGRAMMER_ARGS="dev=/dev/ttyUSB0:1500000" +# would make executing './flashrom' (almost) equivialent to './flashrom -p serprog:dev=/dev/ttyUSB0:1500000'. # If your compiler spits out excessive warnings, run make WARNERROR=no # You shouldn't have to change this flag. @@ -487,6 +492,7 @@ CONFIG_INTERNAL_DMI ?= yes # Depending on the CONFIG_* variables set and verified above we set compiler flags and parameters below. FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER=$(CONFIG_DEFAULT_PROGRAMMER)' +FEATURE_CFLAGS += -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="$(CONFIG_DEFAULT_PROGRAMMER_ARGS)"' ifeq ($(CONFIG_INTERNAL), yes) FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1' -- cgit v1.2.3