Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
dianlujitao | 5ec3773 | 2018-01-18 21:24:30 +0800 | [diff] [blame] | 2 | # Copyright (C) 2017-2018 The LineageOS Project |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Rashed Abdel-Tawab | 0705be0 | 2017-11-03 12:15:23 -0700 | [diff] [blame] | 16 | ifeq ($(call my-dir),$(call project-path-for,qcom-power)) |
| 17 | |
Anurag Singh | 9cec85b | 2012-09-04 21:46:24 -0700 | [diff] [blame] | 18 | LOCAL_PATH := $(call my-dir) |
| 19 | |
Anurag Singh | 51c4354 | 2012-12-11 12:09:28 -0800 | [diff] [blame] | 20 | ifeq ($(call is-vendor-board-platform,QCOM),true) |
Anh Nguyen | 9501d92 | 2012-11-14 04:20:15 -0800 | [diff] [blame] | 21 | |
Anurag Singh | 9cec85b | 2012-09-04 21:46:24 -0700 | [diff] [blame] | 22 | include $(CLEAR_VARS) |
| 23 | |
Shashank Mittal | 7c7b047 | 2014-05-19 18:03:21 -0700 | [diff] [blame] | 24 | LOCAL_MODULE_RELATIVE_PATH := hw |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 25 | LOCAL_SHARED_LIBRARIES := \ |
| 26 | liblog \ |
| 27 | libcutils \ |
| 28 | libdl \ |
| 29 | libxml2 \ |
| 30 | libhidlbase \ |
| 31 | libhidltransport \ |
| 32 | libhardware \ |
Vinay Verma | 9e84f10 | 2018-09-14 11:25:46 +0530 | [diff] [blame] | 33 | libhwbinder \ |
Rashed Abdel-Tawab | 067a907 | 2017-12-30 00:41:49 +0200 | [diff] [blame] | 34 | libutils |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 35 | |
| 36 | LOCAL_SRC_FILES := \ |
| 37 | service.cpp \ |
| 38 | Power.cpp \ |
| 39 | power-helper.c \ |
| 40 | metadata-parser.c \ |
| 41 | utils.c \ |
| 42 | list.c \ |
Michael Bestas | a966c4c | 2018-06-09 16:02:34 +0300 | [diff] [blame] | 43 | hint-data.c |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 44 | |
Ananth Raghavan Subramanian | e432dbf | 2017-03-24 16:30:12 -0700 | [diff] [blame] | 45 | LOCAL_C_INCLUDES := external/libxml2/include \ |
| 46 | external/icu/icu4c/source/common |
Anurag Singh | 057806b | 2013-04-16 16:53:45 -0700 | [diff] [blame] | 47 | |
Michael Bestas | 593b9d0 | 2018-03-26 01:00:20 +0300 | [diff] [blame] | 48 | LOCAL_CFLAGS += -Wall -Wextra -Werror |
| 49 | |
Christopher R. Palmer | 047cb66 | 2016-04-07 06:13:45 -0400 | [diff] [blame] | 50 | ifneq ($(BOARD_POWER_CUSTOM_BOARD_LIB),) |
| 51 | LOCAL_WHOLE_STATIC_LIBRARIES += $(BOARD_POWER_CUSTOM_BOARD_LIB) |
| 52 | else |
| 53 | |
Anurag Singh | 057806b | 2013-04-16 16:53:45 -0700 | [diff] [blame] | 54 | # Include target-specific files. |
Zhao Wei Liew | fbb8521 | 2015-11-17 17:45:03 +0800 | [diff] [blame] | 55 | ifeq ($(call is-board-platform-in-list, msm8960), true) |
| 56 | LOCAL_SRC_FILES += power-8960.c |
| 57 | endif |
| 58 | |
Anurag Singh | 057806b | 2013-04-16 16:53:45 -0700 | [diff] [blame] | 59 | ifeq ($(call is-board-platform-in-list, msm8974), true) |
| 60 | LOCAL_SRC_FILES += power-8974.c |
| 61 | endif |
| 62 | |
Vince Leung | 699c1bc | 2013-08-14 17:40:36 -0700 | [diff] [blame] | 63 | ifeq ($(call is-board-platform-in-list, msm8226), true) |
| 64 | LOCAL_SRC_FILES += power-8226.c |
| 65 | endif |
| 66 | |
| 67 | ifeq ($(call is-board-platform-in-list, msm8610), true) |
| 68 | LOCAL_SRC_FILES += power-8610.c |
| 69 | endif |
| 70 | |
Dilip Gudlur | f18fc4c | 2014-01-15 14:24:45 -0800 | [diff] [blame] | 71 | ifeq ($(call is-board-platform-in-list, apq8084), true) |
| 72 | LOCAL_SRC_FILES += power-8084.c |
| 73 | endif |
| 74 | |
Dilip Gudlur | cf3644b | 2014-11-02 17:25:52 -0800 | [diff] [blame] | 75 | ifeq ($(call is-board-platform-in-list, msm8994), true) |
| 76 | LOCAL_SRC_FILES += power-8994.c |
| 77 | endif |
| 78 | |
Dilip Gudlur | e9f9c98 | 2015-01-28 15:17:45 -0800 | [diff] [blame] | 79 | ifeq ($(call is-board-platform-in-list, msm8992), true) |
| 80 | LOCAL_SRC_FILES += power-8992.c |
| 81 | endif |
| 82 | |
Dilip Gudlur | 4edd2c3 | 2015-07-01 14:13:43 -0700 | [diff] [blame] | 83 | ifeq ($(call is-board-platform-in-list, msm8996), true) |
| 84 | LOCAL_SRC_FILES += power-8996.c |
| 85 | endif |
| 86 | |
Sravan Kumar Ambapuram | 58be233 | 2016-01-07 14:47:37 +0530 | [diff] [blame] | 87 | ifeq ($(call is-board-platform-in-list,msm8937), true) |
BeYkeRYkt | 535cc21 | 2018-12-23 22:55:35 +0900 | [diff] [blame] | 88 | LOCAL_SRC_FILES += power-8937.c |
Sravan Kumar Ambapuram | 58be233 | 2016-01-07 14:47:37 +0530 | [diff] [blame] | 89 | endif |
| 90 | |
Nikhil Kumar Kansal | b40c136 | 2015-05-05 16:10:43 +0530 | [diff] [blame] | 91 | ifeq ($(call is-board-platform-in-list,msm8952), true) |
| 92 | LOCAL_SRC_FILES += power-8952.c |
| 93 | endif |
| 94 | |
Manish Kumar | 43c1ca6 | 2016-03-11 01:26:25 +0530 | [diff] [blame] | 95 | ifeq ($(call is-board-platform-in-list,msm8953), true) |
| 96 | LOCAL_SRC_FILES += power-8953.c |
Sravan Kumar Ambapuram | eea8e56 | 2016-02-28 15:09:37 +0530 | [diff] [blame] | 97 | endif |
| 98 | |
Venkataraman Nerellapalli | 808f1e6 | 2017-05-04 11:02:14 +0530 | [diff] [blame] | 99 | ifeq ($(call is-board-platform-in-list,msm8998 apq8098_latv), true) |
Ananth Raghavan Subramanian | e432dbf | 2017-03-24 16:30:12 -0700 | [diff] [blame] | 100 | LOCAL_SRC_FILES += power-8998.c |
| 101 | endif |
| 102 | |
Vara Prasad A V S G | 9b7a758 | 2017-04-07 17:32:37 +0530 | [diff] [blame] | 103 | ifeq ($(call is-board-platform-in-list,sdm660), true) |
| 104 | LOCAL_SRC_FILES += power-660.c |
| 105 | endif |
| 106 | |
Ananth Raghavan Subramanian | f976fa0 | 2017-05-18 20:46:03 -0700 | [diff] [blame] | 107 | ifeq ($(call is-board-platform-in-list,sdm845), true) |
| 108 | LOCAL_SRC_FILES += power-845.c |
| 109 | endif |
| 110 | |
vaibhav bhalla | acdf932 | 2015-02-23 11:57:38 +0530 | [diff] [blame] | 111 | ifeq ($(call is-board-platform-in-list, msm8909), true) |
| 112 | LOCAL_SRC_FILES += power-8909.c |
| 113 | endif |
| 114 | |
vaibhav bhalla | eef51ad | 2015-02-23 20:11:59 +0530 | [diff] [blame] | 115 | ifeq ($(call is-board-platform-in-list,msm8916), true) |
| 116 | LOCAL_SRC_FILES += power-8916.c |
| 117 | endif |
| 118 | |
Christopher R. Palmer | 047cb66 | 2016-04-07 06:13:45 -0400 | [diff] [blame] | 119 | endif # End of board specific list |
| 120 | |
Keith Mok | 72201a0 | 2015-11-13 09:46:14 -0800 | [diff] [blame] | 121 | ifneq ($(TARGET_POWER_SET_FEATURE_LIB),) |
| 122 | LOCAL_STATIC_LIBRARIES += $(TARGET_POWER_SET_FEATURE_LIB) |
| 123 | endif |
| 124 | |
Vince Leung | 6857466 | 2013-07-16 16:47:00 -0700 | [diff] [blame] | 125 | ifeq ($(TARGET_USES_INTERACTION_BOOST),true) |
| 126 | LOCAL_CFLAGS += -DINTERACTION_BOOST |
| 127 | endif |
| 128 | |
Steve Kondik | a0e0495 | 2014-03-27 22:00:00 -0700 | [diff] [blame] | 129 | ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),) |
| 130 | LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT |
| 131 | LOCAL_SRC_FILES += ../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT) |
| 132 | endif |
| 133 | |
Steve Kondik | cd8bfdc | 2015-10-19 14:43:39 -0700 | [diff] [blame] | 134 | ifneq ($(TARGET_TAP_TO_WAKE_NODE),) |
| 135 | LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\" |
| 136 | endif |
| 137 | |
Rashed Abdel-Tawab | 067a907 | 2017-12-30 00:41:49 +0200 | [diff] [blame] | 138 | ifeq ($(TARGET_HAS_LEGACY_POWER_STATS),true) |
| 139 | LOCAL_CFLAGS += -DLEGACY_STATS |
| 140 | endif |
| 141 | |
Michael Bestas | 64de35f | 2018-07-03 21:29:54 +0300 | [diff] [blame] | 142 | ifeq ($(TARGET_HAS_NO_POWER_STATS),true) |
| 143 | LOCAL_CFLAGS += -DNO_STATS |
| 144 | endif |
| 145 | |
Ethan Chen | 1db0a65 | 2018-03-01 00:59:30 -0800 | [diff] [blame] | 146 | ifneq ($(TARGET_RPM_STAT),) |
| 147 | LOCAL_CFLAGS += -DRPM_STAT=\"$(TARGET_RPM_STAT)\" |
| 148 | endif |
| 149 | |
| 150 | ifneq ($(TARGET_RPM_MASTER_STAT),) |
| 151 | LOCAL_CFLAGS += -DRPM_MASTER_STAT=\"$(TARGET_RPM_MASTER_STAT)\" |
| 152 | endif |
| 153 | |
| 154 | ifneq ($(TARGET_RPM_SYSTEM_STAT),) |
| 155 | LOCAL_CFLAGS += -DRPM_SYSTEM_STAT=\"$(TARGET_RPM_SYSTEM_STAT)\" |
| 156 | endif |
| 157 | |
Rashed Abdel-Tawab | 067a907 | 2017-12-30 00:41:49 +0200 | [diff] [blame] | 158 | ifneq ($(TARGET_WLAN_POWER_STAT),) |
| 159 | LOCAL_CFLAGS += -DWLAN_POWER_STAT=\"$(TARGET_WLAN_POWER_STAT)\" |
| 160 | endif |
| 161 | |
Rashed Abdel-Tawab | bd767ce | 2018-09-17 12:14:16 -0700 | [diff] [blame] | 162 | ifeq ($(TARGET_HAS_NO_WLAN_STATS),true) |
| 163 | LOCAL_CFLAGS += -DNO_WLAN_STATS |
| 164 | endif |
Vinay Verma | 9e84f10 | 2018-09-14 11:25:46 +0530 | [diff] [blame] | 165 | |
| 166 | ifeq ($(TARGET_ARCH),arm) |
| 167 | LOCAL_CFLAGS += -DARCH_ARM_32 |
| 168 | endif |
| 169 | |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 170 | LOCAL_MODULE := android.hardware.power@1.1-service-qti |
| 171 | LOCAL_INIT_RC := android.hardware.power@1.1-service-qti.rc |
Rashed Abdel-Tawab | bd767ce | 2018-09-17 12:14:16 -0700 | [diff] [blame] | 172 | LOCAL_SHARED_LIBRARIES += android.hardware.power@1.1 vendor.lineage.power@1.0 |
Anurag Singh | 9cec85b | 2012-09-04 21:46:24 -0700 | [diff] [blame] | 173 | LOCAL_MODULE_TAGS := optional |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 174 | LOCAL_MODULE_OWNER := qcom |
Vara Prasad A V S G | 52f7133 | 2017-06-11 06:13:17 +0530 | [diff] [blame] | 175 | LOCAL_VENDOR_MODULE := true |
Rashed Abdel-Tawab | 9c14c9f | 2017-12-26 23:11:03 +0200 | [diff] [blame] | 176 | LOCAL_HEADER_LIBRARIES := libhardware_headers |
Rashed Abdel-Tawab | 00b2185 | 2017-11-03 12:44:16 -0700 | [diff] [blame] | 177 | include $(BUILD_EXECUTABLE) |
Anurag Singh | 51c4354 | 2012-12-11 12:09:28 -0800 | [diff] [blame] | 178 | |
Anh Nguyen | 9501d92 | 2012-11-14 04:20:15 -0800 | [diff] [blame] | 179 | endif |
Rashed Abdel-Tawab | 0705be0 | 2017-11-03 12:15:23 -0700 | [diff] [blame] | 180 | |
| 181 | endif |