Author: stefanct Date: Wed Aug 28 11:55:04 2013 New Revision: 1726 URL: http://flashrom.org/trac/flashrom/changeset/1726
Log: 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.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Modified: trunk/Makefile
Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Tue Aug 27 20:02:19 2013 (r1725) +++ trunk/Makefile Wed Aug 28 11:55:04 2013 (r1726) @@ -218,6 +218,10 @@ 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