check for outdated version of make

This commit is contained in:
devsaurus 2017-04-23 17:34:42 +02:00
parent 587bfd4084
commit 9cca38767f
1 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,12 @@
-include $(PROJECT_PATH)/build/include/config/auto.conf
include $(PROJECT_PATH)/components/modules/uppercase.mk
ifneq (4.0, $(firstword $(sort $(MAKE_VERSION) 4.0)))
# make versions below 4.0 will fail on the uppercase function used in
# the exapnsion of MODULE_NAMES.
$(error GNU make version 4.0 or above required)
endif
MODULE_NAMES:=$(call uppercase,$(patsubst $(COMPONENT_PATH)/%.c,%,$(wildcard $(COMPONENT_PATH)/*.c)))
FORCE_LINK:=$(foreach mod,$(MODULE_NAMES),$(if $(CONFIG_LUA_MODULE_$(mod)), -u $(mod)_module_selected1))
COMPONENT_ADD_LDFLAGS=$(FORCE_LINK) -lmodules $(if $(CONFIG_LUA_MODULE_BTHCI),-lbtdm_app)