diff options
author | Lee Campbell <leecam@google.com> | 2016-01-08 15:57:38 -0800 |
---|---|---|
committer | Lee Campbell <leecam@google.com> | 2016-01-08 16:10:46 -0800 |
commit | 9b78f59d922d12eea3883ae51a8345330b529595 (patch) | |
tree | 15618f466d324a8712af8989e09989e9739e6254 | |
parent | 59f22f21b479acb5a21ac0af79fbb24d1ffa5a4e (diff) | |
download | brillo-m9-release.tar.gz |
brillo: Add helper to conditionally include hal makefilesbrillo-m9-releasebrillo-m9-dev
This allows peripherals to define a hal.mk alongside their
peripheral.mk. The hal.mk will be included as an Android.mk
would, if the peripheral.mk is selected by the device definition
BUG: 26472263
Change-Id: Id66679549c1bc679e3a003000bba9bea95a3c39a
-rw-r--r-- | brillo_base.mk | 1 | ||||
-rw-r--r-- | build/Android.mk | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/brillo_base.mk b/brillo_base.mk index 94d21ab..388ef02 100644 --- a/brillo_base.mk +++ b/brillo_base.mk @@ -376,6 +376,7 @@ define add_peripheral $(eval peripheral_name := $(strip $(2))) \ $(eval peripheral_make_file := $(HARDWARE_BSP_PREFIX)/$(peripheral_vendor)/peripheral/$(peripheral_name)/peripheral.mk) \ $(eval peripheral_prebuilts_make_file := $(HARDWARE_BSP_PREBUILTS_PREFIX)/$(peripheral_vendor)/hardware/peripheral/$(peripheral_name)/peripheral.mk) \ + $(eval HAL_MAKEFILES += $(HARDWARE_BSP_PREFIX)/$(peripheral_vendor)/peripheral/$(peripheral_name)/hal.mk) \ $(if $(wildcard $(peripheral_make_file)),$(eval include $(peripheral_make_file)), \ $(if $(wildcard $(peripheral_prebuilts_make_file)),$(eval include $(peripheral_prebuilts_make_file)), \ $(error Can't find peripheral definition. Vendor: $(peripheral_vendor) peripheral: $(peripheral_name)))) diff --git a/build/Android.mk b/build/Android.mk index dbb26c1..795e051 100644 --- a/build/Android.mk +++ b/build/Android.mk @@ -15,8 +15,12 @@ # # ----------------------------------------------------------------- -# The vendor partition package for brillo device. +# Include the peripheral HALs +$(foreach f,$(HAL_MAKEFILES), \ + $(if $(wildcard $(f)),$(eval include $(f)))) + +# The vendor partition package for brillo device. ifdef BRILLO_VENDOR_PARTITIONS # The staging directory to store vendor partitions. |