]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - build/Makefile.lib.inc
Remove useless FreeRTOS versions
[pes-rpp/rpp-lib.git] / build / Makefile.lib.inc
index 16f265d6dc19dc0e014be200b0959734119ca7bb..2418450ddf5bfbc8eeb849a0b845c9e8f0953fa3 100644 (file)
@@ -15,6 +15,18 @@ makefile_lib_inc_dir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
 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
@@ -31,7 +43,7 @@ $(makefile_lib_inc_dir)/../rpp-lib.lib: rpp-lib.lib
        $(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 $@))