summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-09-17 21:18:07 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-19 13:52:40 -0700
commit9d1910f5a0772b06c3c48a5c5f3c3412b0a1b682 (patch)
tree3187db5a75dbc3d510c7d2c9a48df1619f1235ac /Makefile
parentb205b3e1a30625c230551778b9d1d716536ad1ff (diff)
downloadchrome-ec-9d1910f5a0772b06c3c48a5c5f3c3412b0a1b682.tar.gz
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 <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/300609 Commit-Ready: Bill Richardson <wfrichar@google.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files 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)