summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-02 00:12:23 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-02 00:12:23 +0000
commitc4846dd44dbf64532b877f96d6968a2a655523d2 (patch)
tree2024a49710df58beb390dd05b425bf1b686a3eb8 /Makefile
parent6cee1655272569e8eafc046bb048026f43a920b5 (diff)
downloadflashrom-c4846dd44dbf64532b877f96d6968a2a655523d2.tar.gz
Add default arguments for the default programmer (only).
This code exists thanks to food for thought from Urja Rannikko. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1814 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7f7aa92..d3c1ba5 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'