Allow properly for out-of-tree components (was a hack before)
This commit is contained in:
parent
9f5bc3735e
commit
421f8ddaa5
1 changed files with 9 additions and 2 deletions
11
common.mk
11
common.mk
|
@ -307,8 +307,15 @@ PROGRAM_MAKEFILE = $(firstword $(MAKEFILE_LIST))
|
||||||
$(eval $(call component_compile_rules,PROGRAM))
|
$(eval $(call component_compile_rules,PROGRAM))
|
||||||
|
|
||||||
## Include other components (this is where the actual compiler sections are generated)
|
## Include other components (this is where the actual compiler sections are generated)
|
||||||
$(foreach component,$(COMPONENTS), $(eval include $(ROOT)$(component)/component.mk))
|
##
|
||||||
|
## if component directory exists relative to $(ROOT), use that.
|
||||||
|
## otherwise try to resolve it as an absolute path
|
||||||
|
$(foreach component,$(COMPONENTS), \
|
||||||
|
$(if $(wildcard $(ROOT)$(component)), \
|
||||||
|
$(eval include $(ROOT)$(component)/component.mk), \
|
||||||
|
$(eval include $(component)/component.mk) \
|
||||||
|
) \
|
||||||
|
)
|
||||||
|
|
||||||
## Run linker scripts via C preprocessor to evaluate macros
|
## Run linker scripts via C preprocessor to evaluate macros
|
||||||
$(LD_DIR)%.ld: $(ROOT)ld/%.ld | $(LD_DIR)
|
$(LD_DIR)%.ld: $(ROOT)ld/%.ld | $(LD_DIR)
|
||||||
|
|
Loading…
Reference in a new issue