From a7fabc8b443a79fe320f0b6f40f005360f261695 Mon Sep 17 00:00:00 2001 From: "Christopher R. Palmer" Date: Thu, 7 Apr 2016 06:13:45 -0400 Subject: [PATCH] power: Allow devices to write their own platform specific bits Using this hook, any device should be able to reuse the majority of the powerhal and fork only power-.c if they feel that they need the ability to provide more specific tuning of the hints/etc. for their device. Change-Id: I013a3ec3ddccbe6f74f3dacf456cc6e8b3ab3430 --- Android.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Android.mk b/Android.mk index cbc4f09..b46fdc6 100644 --- a/Android.mk +++ b/Android.mk @@ -16,6 +16,10 @@ LOCAL_SRC_FILES := power-common.c metadata-parser.c utils.c list.c hint-data.c p LOCAL_C_INCLUDES := external/libxml2/include \ external/icu/icu4c/source/common +ifneq ($(BOARD_POWER_CUSTOM_BOARD_LIB),) + LOCAL_WHOLE_STATIC_LIBRARIES += $(BOARD_POWER_CUSTOM_BOARD_LIB) +else + # Include target-specific files. ifeq ($(call is-board-platform-in-list, msm8974), true) LOCAL_SRC_FILES += power-8974.c @@ -77,6 +81,8 @@ ifeq ($(call is-board-platform-in-list,msmnile), true) LOCAL_SRC_FILES += power-msmnile.c endif +endif # End of board specific list + ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),) LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT)