From 9d1910f5a0772b06c3c48a5c5f3c3412b0a1b682 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 17 Sep 2015 21:18:07 -0700 Subject: Let private repos define their own subdirectories Private repos should be as independent as possible. This change makes it easier for them to declare their own subdirectories. BUG=none BRANCH=none TEST=make buildall Change-Id: I590e8c035f05ab157eb63c552ced5995f25cabc9 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/300609 Commit-Ready: Bill Richardson Reviewed-by: Randall Spangler --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 04ab728222..436f2358eb 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,9 @@ $(eval CHIP_$(UC_CHIP)=y) $(eval CHIP_VARIANT_$(UC_CHIP_VARIANT)=y) $(eval CHIP_FAMILY_$(UC_CHIP_FAMILY)=y) +# Private subdirectories may call this from their build.mk +ro-objs_from_dir=$(sort $(foreach obj, $($(2)-y), $(out)/RO/$(1)/$(obj))) + # Get build configuration from sub-directories # Note that this re-includes the board and chip makefiles include $(BDIR)/build.mk @@ -136,10 +139,8 @@ include util/signer/build.mk includes+=$(includes-y) -ro-objs_from_dir=$(sort $(foreach obj, $($(2)-y), $(out)/RO/$(1)/$(obj))) - # Get all sources to build -all-ro-y=$(call ro-objs_from_dir,core/$(CORE),core) +all-ro-y+=$(call ro-objs_from_dir,core/$(CORE),core) all-ro-y+=$(call ro-objs_from_dir,chip/$(CHIP),chip) all-ro-y+=$(call ro-objs_from_dir,$(BDIR),board) all-ro-y+=$(call ro-objs_from_dir,private,private) -- cgit v1.2.1