Add RULES_TOP and top Makefile definitions to build embedded TOPs (test, examples) as part of the main build

This commit is contained in:
Ralph Lange
2014-02-14 12:28:02 +01:00
parent 2269a5bd66
commit c445368537
2 changed files with 28 additions and 6 deletions

View File

@ -1,13 +1,22 @@
#Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG
DIRS += configure
DIRS := $(DIRS) $(filter-out $(DIRS), configure)
DIRS := $(DIRS) $(filter-out $(DIRS), src)
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard example*))
DIRS += src
src_DEPEND_DIRS = configure
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), test)
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), arrayPerformance)
EMBEDDED_TOPS := $(EMBEDDED_TOPS) $(filter-out $(EMBEDDED_TOPS), $(wildcard example*))
DIRS += test
define DIR_template
$(1)_DEPEND_DIRS = configure
endef
$(foreach dir, $(filter-out configure,$(DIRS)),$(eval $(call DIR_template,$(dir))))
define EMB_template
$(1)_DEPEND_DIRS = src
endef
$(foreach dir, $(EMBEDDED_TOPS),$(eval $(call EMB_template,$(dir))))
include $(TOP)/configure/RULES_TOP

View File

@ -1,3 +1,16 @@
#RULES_TOP
include $(CONFIG)/RULES_TOP
EMTOPACTIONS += cvsclean realuninstall
distclean: emtop_distclean
emtopDistcleanTargets += $(foreach dir, $(EMBEDDED_TOPS), \
$(dir)$(DIVIDER)emtop_dummy_action)
$(emtopDistcleanTargets) :
$(MAKE) -C $(dirPart) $(EMTOPACTIONS)
emtop_distclean : $(emtopDistcleanTargets)
.PHONY : $(emtopDistcleanTargets)