Add RULES_TOP and top Makefile definitions to build embedded TOPs (test, examples) as part of the main build
This commit is contained in:
21
Makefile
21
Makefile
@ -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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user