blob: c6910d53c547c709430d17bed09c141459840637
1 | # Copyright (C) 2008 The Android Open Source Project |
2 | # |
3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
4 | # you may not use this file except in compliance with the License. |
5 | # You may obtain a copy of the License at |
6 | # |
7 | # http://www.apache.org/licenses/LICENSE-2.0 |
8 | # |
9 | # Unless required by applicable law or agreed to in writing, software |
10 | # distributed under the License is distributed on an "AS IS" BASIS, |
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | # See the License for the specific language governing permissions and |
13 | # limitations under the License. |
14 | |
15 | LOCAL_PATH := $(call my-dir) |
16 | include $(CLEAR_VARS) |
17 | |
18 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28 && echo OK),OK) |
19 | LOCAL_PROPRIETARY_MODULE := true |
20 | endif |
21 | |
22 | LOCAL_CPPFLAGS := $(HWC_CPP_FLAGS) |
23 | LOCAL_CFLAGS := $(HWC_C_FLAGS) |
24 | LOCAL_SHARED_LIBRARIES := $(HWC_SHARED_LIBS) |
25 | |
26 | #*********************************HWC DISPLAY Config************************ |
27 | ifneq ($(HWC_DISPLAY_NUM),) |
28 | LOCAL_CFLAGS += -DHWC_DISPLAY_NUM=$(HWC_DISPLAY_NUM) |
29 | else |
30 | $(error "need config hwc crtc num") |
31 | endif |
32 | |
33 | #PIPELIEN CONFIG |
34 | #Primary |
35 | ifneq ($(HWC_PIPELINE),) |
36 | LOCAL_CFLAGS += -DHWC_PIPELINE=\"$(HWC_PIPELINE)\" |
37 | else |
38 | $(info "no pipeline configed, will use default") |
39 | endif |
40 | |
41 | #Vdin fb postprocessor type |
42 | ifneq ($(HWC_VDIN_FBPROCESSOR),) |
43 | LOCAL_CFLAGS += -DHWC_VDIN_FBPROCESSOR=\"$(HWC_VDIN_FBPROCESSOR)\" |
44 | endif |
45 | |
46 | #FRAMEBUFFER CONFIG |
47 | #Primary |
48 | ifneq ($(HWC_PRIMARY_FRAMEBUFFER_WIDTH)$(HWC_PRIMARY_FRAMEBUFFER_HEIGHT),) |
49 | LOCAL_CFLAGS += -DHWC_PRIMARY_FRAMEBUFFER_WIDTH=$(HWC_PRIMARY_FRAMEBUFFER_WIDTH) |
50 | LOCAL_CFLAGS += -DHWC_PRIMARY_FRAMEBUFFER_HEIGHT=$(HWC_PRIMARY_FRAMEBUFFER_HEIGHT) |
51 | endif |
52 | #Extend, if needed. |
53 | ifneq ($(HWC_EXTEND_FRAMEBUFFER_WIDTH)$(HWC_EXTEND_FRAMEBUFFER_HEIGHT),) |
54 | LOCAL_CFLAGS += -DHWC_EXTEND_FRAMEBUFFER_WIDTH=$(HWC_EXTEND_FRAMEBUFFER_WIDTH) |
55 | LOCAL_CFLAGS += -DHWC_EXTEND_FRAMEBUFFER_HEIGHT=$(HWC_EXTEND_FRAMEBUFFER_HEIGHT) |
56 | endif |
57 | |
58 | #CONNECTOR |
59 | #Primary |
60 | ifneq ($(HWC_PRIMARY_CONNECTOR_TYPE),) |
61 | LOCAL_CFLAGS += -DHWC_PRIMARY_CONNECTOR_TYPE=\"$(HWC_PRIMARY_CONNECTOR_TYPE)\" |
62 | else |
63 | $(error "need config hwc primary connector type") |
64 | endif |
65 | #Extend, if needed. |
66 | ifneq ($(HWC_EXTEND_CONNECTOR_TYPE),) |
67 | LOCAL_CFLAGS += -DHWC_EXTEND_CONNECTOR_TYPE=\"$(HWC_EXTEND_CONNECTOR_TYPE)\" |
68 | endif |
69 | |
70 | #HEADLESS MODE |
71 | ifeq ($(HWC_ENABLE_HEADLESS_MODE), true) |
72 | LOCAL_CFLAGS += -DHWC_ENABLE_HEADLESS_MODE |
73 | LOCAL_CFLAGS += -DHWC_HEADLESS_REFRESHRATE=5 |
74 | endif |
75 | |
76 | #Active Mode |
77 | ifeq ($(HWC_ENABLE_ACTIVE_MODE), true) |
78 | LOCAL_CFLAGS += -DHWC_ENABLE_ACTIVE_MODE |
79 | endif |
80 | |
81 | #Real Mode |
82 | ifeq ($(HWC_ENABLE_REAL_MODE), true) |
83 | LOCAL_CFLAGS += -DHWC_ENABLE_REAL_MODE |
84 | endif |
85 | |
86 | #Display Calibrate |
87 | ifeq ($(HWC_ENABLE_PRE_DISPLAY_CALIBRATE), true) |
88 | #pre display calibrate means calibrate in surfacefligner, |
89 | #all the coordinates got by hwc already calibrated. |
90 | LOCAL_CFLAGS += -DHWC_ENABLE_PRE_DISPLAY_CALIBRATE |
91 | endif |
92 | |
93 | #HWC Feature Config |
94 | ifeq ($(HWC_ENABLE_SOFTWARE_VSYNC), true) |
95 | LOCAL_CFLAGS += -DHWC_ENABLE_SOFTWARE_VSYNC |
96 | endif |
97 | ifeq ($(ENABLE_PRIMARY_DISPLAY_HOTPLUG), true) #Used for NTS test |
98 | HWC_ENABLE_PRIMARY_HOTPLUG := true |
99 | endif |
100 | ifeq ($(HWC_ENABLE_PRIMARY_HOTPLUG), true) #need surfaceflinger modifications |
101 | LOCAL_CFLAGS += -DHWC_ENABLE_PRIMARY_HOTPLUG |
102 | endif |
103 | ifeq ($(HWC_ENABLE_SECURE_LAYER_PROCESS), true) |
104 | LOCAL_CFLAGS += -DHWC_ENABLE_SECURE_LAYER_PROCESS |
105 | endif |
106 | ifeq ($(HWC_DISABLE_CURSOR_PLANE), true) |
107 | LOCAL_CFLAGS += -DHWC_DISABLE_CURSOR_PLANE |
108 | endif |
109 | ifeq ($(TARGET_USE_DEFAULT_HDR_PROPERTY),true) |
110 | LOCAL_CFLAGS += -DHWC_ENABLE_DEFAULT_HDR_CAPABILITIES |
111 | endif |
112 | ifeq ($(TARGET_APP_LAYER_USE_CONTINUOUS_BUFFER),false) |
113 | LOCAL_CFLAGS += -DHWC_FORCE_CLIENT_COMPOSITION |
114 | endif |
115 | ifeq ($(HWC_PIPE_VIU1VDINVIU2_ALWAYS_LOOPBACK), true) |
116 | LOCAL_CFLAGS += -DHWC_PIPE_VIU1VDINVIU2_ALWAYS_LOOPBACK |
117 | endif |
118 | |
119 | ifeq ($(HWC_DYNAMIC_SWITCH_CONNECTOR), true) |
120 | LOCAL_CFLAGS += -DHWC_DYNAMIC_SWITCH_CONNECTOR |
121 | endif |
122 | ifeq ($(HWC_DYNAMIC_SWITCH_VIU), true) |
123 | LOCAL_CFLAGS += -DHWC_DYNAMIC_SWITCH_VIU |
124 | endif |
125 | #*********************************HWC CONFIGS END************************ |
126 | |
127 | LOCAL_SRC_FILES := \ |
128 | HwcVsync.cpp \ |
129 | HwcConfig.cpp \ |
130 | HwcPowerMode.cpp \ |
131 | HwcDisplayPipe.cpp \ |
132 | FixedDisplayPipe.cpp \ |
133 | LoopbackDisplayPipe.cpp \ |
134 | DualDisplayPipe.cpp |
135 | |
136 | LOCAL_C_INCLUDES := \ |
137 | hardware/libhardware/include \ |
138 | $(LOCAL_PATH)/include |
139 | |
140 | LOCAL_STATIC_LIBRARIES := \ |
141 | hwc.utils_static \ |
142 | hwc.base_static \ |
143 | hwc.display_static \ |
144 | hwc.debug_static \ |
145 | hwc.postprocessor_static |
146 | |
147 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ |
148 | $(LOCAL_PATH)/include |
149 | |
150 | LOCAL_MODULE := hwc.common_static |
151 | |
152 | include $(BUILD_STATIC_LIBRARY) |
153 |