flashrom won't built 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.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- refined version to make old men happy by not breaking even older build hosts.
Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/Makefile b/Makefile index 3b24bc4..b992790 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,16 @@ endif endif
ifeq ($(TARGET_OS), libpayload) +# We want to build libflashrom.a by default here. To override the default target we need the special GNU make +# variable DEFAULT_GOAL which is available since 3.81. To support building on ancient hosts check this first. +min_version_needed := 3.81 +ok := $(filter $(min_version_needed), $(firstword $(sort $(MAKE_VERSION) $(min_version_needed)))) +ifneq ($(ok),) +ifeq ($(MAKECMDGOALS),) +.DEFAULT_GOAL := libflashrom.a +$(info Setting default goal to libflashrom.a) +endif +endif FLASHROM_CFLAGS += -DSTANDALONE ifeq ($(CONFIG_DUMMY), yes) UNSUPPORTED_FEATURES += CONFIG_DUMMY=yes