summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-08-28 09:55:04 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-08-28 09:55:04 +0000
commit17e98cb96a59dabdf9054a125f51dc396d80f5ec (patch)
treefd621ef7c6ec55edd126c96ab28d24c0ca6c4f98 /Makefile
parent1edfd0b9ef0f5dd8d8ced868fe5f130a0aec2580 (diff)
downloadflashrom-17e98cb96a59dabdf9054a125f51dc396d80f5ec.zip
flashrom-17e98cb96a59dabdf9054a125f51dc396d80f5ec.tar.gz
libpayload: By default build libflashrom.a instead of flashrom
Flashrom won't build nor run as native payload very soon (or ever). This patch changes a special GNU make variable that allows to select the default goal which is taken if no goal is given explicitly on the command line. Normally this would be the first rule in Makefile, i.e. all. This won't compile if the target OS is libpayload, hence change it to "libflashrom.a" in that case. This requires two not completely ancient GNU make features: - MAKECMDGOALS - .DEFAULT_GOAL Checking for these with ancient-only GNU make features is non-trivial and hereby postponed. Corresponding to flashrom svn r1726. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ae2b39f..5410a71 100644
--- a/Makefile
+++ b/Makefile
@@ -218,6 +218,10 @@ endif
endif
ifeq ($(TARGET_OS), libpayload)
+ifeq ($(MAKECMDGOALS),)
+.DEFAULT_GOAL := libflashrom.a
+$(info Setting default goal to libflashrom.a)
+endif
FLASHROM_CFLAGS += -DSTANDALONE
ifeq ($(CONFIG_DUMMY), yes)
UNSUPPORTED_FEATURES += CONFIG_DUMMY=yes
OpenPOWER on IntegriCloud