blob: 4724c65ee3638f891b51b01192a86c347a8bb60e [file] [log] [blame]
David Ngee7c4c52018-03-22 23:49:12 -07001LOCAL_PATH := $(call my-dir)
2
David Ngee7c4c52018-03-22 23:49:12 -07003ifeq ($(call is-vendor-board-platform,QCOM),true)
4
David Ngee7c4c52018-03-22 23:49:12 -07005include $(CLEAR_VARS)
6
7LOCAL_MODULE_RELATIVE_PATH := hw
Siddeswar Alugantie6368222022-04-12 12:33:13 -07008
Michael Bestas0b6459f2019-09-29 23:59:05 +03009LOCAL_SHARED_LIBRARIES := \
10 liblog \
11 libcutils \
12 libdl \
13 libbase \
14 libutils \
15 libbinder_ndk \
16 android.hardware.power-V3-ndk
17
18LOCAL_HEADER_LIBRARIES := \
Michael Bestas0b6459f2019-09-29 23:59:05 +030019 libhardware_headers
20
21LOCAL_SRC_FILES := \
22 power-common.c \
23 metadata-parser.c \
24 utils.c \
25 list.c \
26 hint-data.c \
27 Power.cpp \
28 main.cpp \
29 PowerHintSession.cpp
David Ngee7c4c52018-03-22 23:49:12 -070030
Michael Bestas39e18572018-03-26 01:00:20 +030031LOCAL_CFLAGS += -Wall -Wextra -Werror
32
Christopher R. Palmera7fabc82016-04-07 06:13:45 -040033ifneq ($(BOARD_POWER_CUSTOM_BOARD_LIB),)
34 LOCAL_WHOLE_STATIC_LIBRARIES += $(BOARD_POWER_CUSTOM_BOARD_LIB)
35else
36
David Ngee7c4c52018-03-22 23:49:12 -070037# Include target-specific files.
Michael Bestasdbaf7b32023-10-26 15:13:27 +030038ifeq ($(call is-board-platform-in-list,msm8996), true)
David Ngee7c4c52018-03-22 23:49:12 -070039LOCAL_SRC_FILES += power-8996.c
40endif
41
42ifeq ($(call is-board-platform-in-list,msm8937), true)
Michael Bestasd526c7c2019-10-06 05:12:37 +030043LOCAL_SRC_FILES += power-8937.c
David Ngee7c4c52018-03-22 23:49:12 -070044endif
45
David Ngee7c4c52018-03-22 23:49:12 -070046ifeq ($(call is-board-platform-in-list,msm8953), true)
47LOCAL_SRC_FILES += power-8953.c
48endif
49
Michael Bestasdbaf7b32023-10-26 15:13:27 +030050ifeq ($(call is-board-platform-in-list,msm8998), true)
David Ngee7c4c52018-03-22 23:49:12 -070051LOCAL_SRC_FILES += power-8998.c
52endif
53
54ifeq ($(call is-board-platform-in-list,sdm660), true)
55LOCAL_SRC_FILES += power-660.c
56endif
57
58ifeq ($(call is-board-platform-in-list,sdm845), true)
59LOCAL_SRC_FILES += power-845.c
60endif
61
Michael Bestas0b6459f2019-09-29 23:59:05 +030062endif # End of board specific list
Christopher R. Palmera7fabc82016-04-07 06:13:45 -040063
LuK1337de33dae2020-10-01 14:13:46 +020064ifneq ($(TARGET_POWERHAL_MODE_EXT),)
65 LOCAL_CFLAGS += -DMODE_EXT
66 LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_MODE_EXT)
67endif
68
Steve Kondike2732b72014-03-27 22:00:00 -070069ifneq ($(TARGET_POWERHAL_SET_INTERACTIVE_EXT),)
70 LOCAL_CFLAGS += -DSET_INTERACTIVE_EXT
71 LOCAL_SRC_FILES += ../../../../$(TARGET_POWERHAL_SET_INTERACTIVE_EXT)
72endif
73
Steve Kondik6b46a292015-10-19 14:43:39 -070074ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
75 LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
76endif
77
David Ngee7c4c52018-03-22 23:49:12 -070078ifeq ($(TARGET_USES_INTERACTION_BOOST),true)
79 LOCAL_CFLAGS += -DINTERACTION_BOOST
80endif
81
Michael Bestas9df9caa2019-09-29 21:06:22 +030082LOCAL_MODULE := android.hardware.power-service-qti
83LOCAL_INIT_RC := android.hardware.power-service-qti.rc
David Ngee7c4c52018-03-22 23:49:12 -070084LOCAL_MODULE_TAGS := optional
85LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-variable
86LOCAL_VENDOR_MODULE := true
Rajeswari Ndbf22f72020-06-30 10:27:46 +053087LOCAL_VINTF_FRAGMENTS := power.xml
Michael Bestas0b6459f2019-09-29 23:59:05 +030088
Ananth Raghavan Subramaniand39ec572018-09-08 19:47:41 -070089include $(BUILD_EXECUTABLE)
Deevana Murthy Bandaru006555f2019-09-13 12:00:27 +053090endif