all:: $(makefile_lib_inc_dir)/../rpp-lib.lib
include ../Makefile.config
+
+# Check that Makefile.config defined values of all defined
+# TARGET_HAS_* variables and no more.
+target_has_list = DMM SPI
+$(foreach name,$(target_has_list),$(if $(filter TARGET_HAS_$(name),$(.VARIABLES)),,\
+ $(error TARGET_HAS_$(name) not defined in Makefile.config)))
+target_has_extra = $(filter-out $(target_has_list:%=TARGET_HAS_%),$(filter TARGET_HAS_%,$(.VARIABLES)))
+$(if $(target_has_extra),\
+ $(error Makefile.config contains supefluous variables: $(target_has_extra)))
+$(foreach name,$(target_has_list),$(if $(or $(filter y,$(TARGET_HAS_$(name))),$(filter n,$(TARGET_HAS_$(name)))),,\
+ $(error TARGET_HAS_$(name) must be 'y' or 'n')))
+
include $(makefile_lib_inc_dir)/../Makefile.var
include $(makefile_lib_inc_dir)/../common.mk
include $(makefile_lib_inc_dir)/Makefile.rules
$(call cp,$<,$@)
$(call cp,$(call pathconv,../Makefile.config),$(dir $@))
--include $(rpp_lib_OBJS:%.obj=%.dep)
+-include $(rpp_lib_DEPS)
$(rpp_lib_c_OBJS): %.obj: $(makefile_lib_inc_dir)/../%.c
$(call mkdir,$(dir $@))