1# Copyright (C) 2012 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# TODO(b/186905324): Switch soc_ver with TARGET_BOARD_PLATFORM
16soc_ver := $(TARGET_BOARD_PLATFORM)
17
18LOCAL_PATH:= $(call my-dir)
19# HAL module implemenation, not prelinked and stored in
20# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.product.board>.so
21
22include $(CLEAR_VARS)
23
24LOCAL_SHARED_LIBRARIES := libcutils libdrm liblog libutils libhardware
25
26LOCAL_PROPRIETARY_MODULE := true
27
28LOCAL_C_INCLUDES += \
29	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdrmresource/include
30
31LOCAL_SRC_FILES := \
32	libdrmresource/utils/worker.cpp \
33	libdrmresource/drm/resourcemanager.cpp \
34	libdrmresource/drm/drmdevice.cpp \
35	libdrmresource/drm/drmconnector.cpp \
36	libdrmresource/drm/drmcrtc.cpp \
37	libdrmresource/drm/drmencoder.cpp \
38	libdrmresource/drm/drmmode.cpp \
39	libdrmresource/drm/drmplane.cpp \
40	libdrmresource/drm/drmproperty.cpp \
41	libdrmresource/drm/drmeventlistener.cpp \
42	libdrmresource/drm/vsyncworker.cpp
43
44LOCAL_CFLAGS := -DHLOG_CODE=0
45LOCAL_CFLAGS += -Wno-unused-parameter
46LOCAL_CFLAGS += -DSOC_VERSION=$(soc_ver)
47LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := libdrm
48
49LOCAL_MODULE := libdrmresource
50LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
51LOCAL_LICENSE_CONDITIONS := notice
52LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
53LOCAL_MODULE_TAGS := optional
54
55include $(TOP)/hardware/google/graphics/common/BoardConfigCFlags.mk
56include $(BUILD_SHARED_LIBRARY)
57
58################################################################################
59include $(CLEAR_VARS)
60
61LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware \
62	android.hardware.graphics.composer@2.4 \
63	android.hardware.graphics.allocator@2.0 \
64	android.hardware.graphics.mapper@2.0 \
65	libhardware_legacy libutils \
66	libsync libacryl libui libion_google libdrmresource libdrm \
67	libvendorgraphicbuffer libbinder_ndk \
68	android.hardware.power-V1-ndk_platform pixel-power-ext-V1-ndk_platform
69
70LOCAL_SHARED_LIBRARIES += com.google.hardware.pixel.display-V4-ndk_platform \
71                          libbinder_ndk \
72                          libbase \
73                          libpng \
74                          libprocessgroup
75
76LOCAL_HEADER_LIBRARIES := libhardware_legacy_headers libbinder_headers google_hal_headers
77LOCAL_HEADER_LIBRARIES += libgralloc_headers
78
79LOCAL_STATIC_LIBRARIES += libVendorVideoApi
80LOCAL_STATIC_LIBRARIES += libjsoncpp
81LOCAL_STATIC_LIBRARIES += libaidlcommonsupport
82LOCAL_PROPRIETARY_MODULE := true
83
84LOCAL_C_INCLUDES += \
85	$(TOP)/hardware/google/graphics/common/include \
86	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdevice \
87	$(TOP)/hardware/google/graphics/common/libhwc2.1/libmaindisplay \
88	$(TOP)/hardware/google/graphics/common/libhwc2.1/libexternaldisplay \
89	$(TOP)/hardware/google/graphics/common/libhwc2.1/libvirtualdisplay \
90	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwchelper \
91	$(TOP)/hardware/google/graphics/common/libhwc2.1/libresource \
92	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1 \
93	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libmaindisplay \
94	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libexternaldisplay \
95	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libvirtualdisplay \
96	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
97	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libdevice \
98	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
99	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libdisplayinterface \
100	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwcService \
101	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdisplayinterface \
102	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdrmresource/include
103
104LOCAL_SRC_FILES := \
105	libhwchelper/ExynosHWCHelper.cpp \
106	ExynosHWCDebug.cpp \
107	libdevice/ExynosDisplay.cpp \
108	libdevice/ExynosDevice.cpp \
109	libdevice/ExynosLayer.cpp \
110	libmaindisplay/ExynosPrimaryDisplay.cpp \
111	libresource/ExynosMPP.cpp \
112	libresource/ExynosResourceManager.cpp \
113	libexternaldisplay/ExynosExternalDisplay.cpp \
114	libvirtualdisplay/ExynosVirtualDisplay.cpp \
115	libdisplayinterface/ExynosDeviceInterface.cpp \
116	libdisplayinterface/ExynosDisplayInterface.cpp \
117	libdisplayinterface/ExynosDeviceDrmInterface.cpp \
118	libdisplayinterface/ExynosDisplayDrmInterface.cpp \
119	pixel-display.cpp
120
121LOCAL_EXPORT_SHARED_LIBRARY_HEADERS += libacryl libdrm libui libvendorgraphicbuffer
122
123LOCAL_VINTF_FRAGMENTS         += pixel-display-default.xml
124
125include $(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/Android.mk
126
127LOCAL_CFLAGS += -DHLOG_CODE=0
128LOCAL_CFLAGS += -DLOG_TAG=\"display\"
129LOCAL_CFLAGS += -Wno-unused-parameter
130LOCAL_CFLAGS += -DSOC_VERSION=$(soc_ver)
131
132LOCAL_MODULE := libexynosdisplay
133LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
134LOCAL_LICENSE_CONDITIONS := notice
135LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
136LOCAL_MODULE_TAGS := optional
137
138include $(TOP)/hardware/google/graphics/common/BoardConfigCFlags.mk
139include $(BUILD_SHARED_LIBRARY)
140
141################################################################################
142
143ifeq ($(BOARD_USES_HWC_SERVICES),true)
144
145include $(CLEAR_VARS)
146
147LOCAL_HEADER_LIBRARIES := libhardware_legacy_headers libbinder_headers google_hal_headers
148LOCAL_HEADER_LIBRARIES += libgralloc_headers
149LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libbinder libexynosdisplay libacryl \
150	android.hardware.graphics.composer@2.4 \
151	android.hardware.graphics.allocator@2.0 \
152	android.hardware.graphics.mapper@2.0
153
154LOCAL_SHARED_LIBRARIES += com.google.hardware.pixel.display-V4-ndk_platform \
155                          libbinder_ndk \
156                          libbase
157
158LOCAL_STATIC_LIBRARIES += libVendorVideoApi
159LOCAL_PROPRIETARY_MODULE := true
160
161LOCAL_C_INCLUDES += \
162	$(TOP)/hardware/google/graphics/common/include \
163	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdevice \
164	$(TOP)/hardware/google/graphics/common/libhwc2.1/libmaindisplay \
165	$(TOP)/hardware/google/graphics/common/libhwc2.1/libexternaldisplay \
166	$(TOP)/hardware/google/graphics/common/libhwc2.1/libvirtualdisplay \
167	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwchelper \
168	$(TOP)/hardware/google/graphics/common/libhwc2.1/libresource \
169	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1 \
170	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libmaindisplay \
171	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libexternaldisplay \
172	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libvirtualdisplay \
173	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
174	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libdevice \
175	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
176	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwcService \
177	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdisplayinterface \
178	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdrmresource/include
179
180LOCAL_EXPORT_SHARED_LIBRARY_HEADERS += libdrm
181LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES)
182
183LOCAL_CFLAGS := -DHLOG_CODE=0
184LOCAL_CFLAGS += -DLOG_TAG=\"hwcservice\"
185LOCAL_CFLAGS += -DSOC_VERSION=$(soc_ver)
186
187LOCAL_SRC_FILES := \
188	libhwcService/IExynosHWC.cpp \
189	libhwcService/ExynosHWCService.cpp
190
191LOCAL_MODULE := libExynosHWCService
192LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
193LOCAL_LICENSE_CONDITIONS := notice
194LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
195LOCAL_MODULE_TAGS := optional
196
197include $(TOP)/hardware/google/graphics/common/BoardConfigCFlags.mk
198include $(BUILD_SHARED_LIBRARY)
199
200endif
201
202################################################################################
203
204include $(CLEAR_VARS)
205
206LOCAL_PRELINK_MODULE := false
207LOCAL_MODULE_RELATIVE_PATH := hw
208LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libexynosdisplay libacryl \
209	android.hardware.graphics.composer@2.4 \
210	android.hardware.graphics.allocator@2.0 \
211	android.hardware.graphics.mapper@2.0 \
212	libui
213
214LOCAL_SHARED_LIBRARIES += com.google.hardware.pixel.display-V4-ndk_platform \
215                          libbinder_ndk \
216                          libbase
217
218LOCAL_PROPRIETARY_MODULE := true
219LOCAL_HEADER_LIBRARIES := libhardware_legacy_headers libbinder_headers google_hal_headers
220LOCAL_HEADER_LIBRARIES += libgralloc_headers
221
222LOCAL_CFLAGS := -DHLOG_CODE=0
223LOCAL_CFLAGS += -DLOG_TAG=\"hwcomposer\"
224LOCAL_CFLAGS += -DSOC_VERSION=$(soc_ver)
225
226ifeq ($(BOARD_USES_HWC_SERVICES),true)
227LOCAL_CFLAGS += -DUSES_HWC_SERVICES
228LOCAL_SHARED_LIBRARIES += libExynosHWCService
229endif
230LOCAL_STATIC_LIBRARIES += libVendorVideoApi
231
232LOCAL_C_INCLUDES += \
233	$(TOP)/hardware/google/graphics/common/include \
234	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdevice \
235	$(TOP)/hardware/google/graphics/common/libhwc2.1/libmaindisplay \
236	$(TOP)/hardware/google/graphics/common/libhwc2.1/libexternaldisplay \
237	$(TOP)/hardware/google/graphics/common/libhwc2.1/libvirtualdisplay \
238	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwchelper \
239	$(TOP)/hardware/google/graphics/common/libhwc2.1/libresource \
240	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1 \
241	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libmaindisplay \
242	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libexternaldisplay \
243	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libvirtualdisplay \
244	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
245	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libdevice \
246	$(TOP)/hardware/google/graphics/$(soc_ver)/libhwc2.1/libresource \
247	$(TOP)/hardware/google/graphics/$(soc_ver)/include \
248	$(TOP)/hardware/google/graphics/common/libhwc2.1/libhwcService \
249	$(TOP)/hardware/google/graphics/common/libhwc2.1/libdisplayinterface
250
251LOCAL_SRC_FILES := \
252	ExynosHWC.cpp
253
254LOCAL_MODULE := hwcomposer.$(TARGET_BOARD_PLATFORM)
255LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
256LOCAL_LICENSE_CONDITIONS := notice
257LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
258LOCAL_MODULE_TAGS := optional
259
260include $(TOP)/hardware/google/graphics/common/BoardConfigCFlags.mk
261include $(BUILD_SHARED_LIBRARY)
262