blob: 8142883a9dc9a0ce378ce14cef19ffbf5b0cd5ac [file] [log] [blame]
Sean Paule0c4c3d2015-01-20 16:56:04 -05001# Copyright (C) 2015 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
Sean Paulcfc06cc2015-04-10 04:45:33 -070015ifeq ($(strip $(BOARD_USES_DRM_HWCOMPOSER)),true)
Sean Paule0c4c3d2015-01-20 16:56:04 -050016
17LOCAL_PATH := $(call my-dir)
Adrian Salidofa37f672017-02-16 10:29:46 -080018
Chih-Hung Hsieh13438002017-11-21 14:53:29 -080019common_drm_hwcomposer_cflags := \
20 -Wall \
21 -Werror \
22 -Wno-unused-function \
23 -Wno-unused-label \
24 -Wno-unused-parameter \
25 -Wno-unused-private-field \
26 -Wno-unused-variable \
27
Adrian Salidofa37f672017-02-16 10:29:46 -080028# =====================
29# libdrmhwc_utils.a
30# =====================
31include $(CLEAR_VARS)
32
33LOCAL_SRC_FILES := \
34 worker.cpp
35
Chih-Hung Hsieh13438002017-11-21 14:53:29 -080036LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags)
37
Adrian Salidofa37f672017-02-16 10:29:46 -080038LOCAL_MODULE := libdrmhwc_utils
Sumit Semwal94bb5962018-04-26 12:05:54 -070039LOCAL_VENDOR_MODULE := true
Adrian Salidofa37f672017-02-16 10:29:46 -080040
41include $(BUILD_STATIC_LIBRARY)
42
43# =====================
44# hwcomposer.drm.so
45# =====================
Sean Paule0c4c3d2015-01-20 16:56:04 -050046include $(CLEAR_VARS)
47
48LOCAL_SHARED_LIBRARIES := \
Lauri Peltonen64717b22015-02-04 16:55:31 +020049 libcutils \
Sean Paule0c4c3d2015-01-20 16:56:04 -050050 libdrm \
Zach Reizner45624d32015-06-10 16:03:01 -070051 libEGL \
52 libGLESv2 \
Sean Paule0c4c3d2015-01-20 16:56:04 -050053 libhardware \
54 liblog \
Sean Paul9aa5ad32015-01-22 15:47:54 -050055 libsync \
Zach Reizner45624d32015-06-10 16:03:01 -070056 libui \
57 libutils
58
Adrian Salidofa37f672017-02-16 10:29:46 -080059LOCAL_STATIC_LIBRARIES := libdrmhwc_utils
Sean Paule0c4c3d2015-01-20 16:56:04 -050060
61LOCAL_C_INCLUDES := \
Rob Herring60d1d4f2017-10-24 19:06:43 -050062 system/core/libsync
Sean Paule0c4c3d2015-01-20 16:56:04 -050063
Sean Paul6a55e9f2015-04-30 15:31:06 -040064LOCAL_SRC_FILES := \
Zach Reizner49446bc2015-11-13 16:09:39 -080065 autolock.cpp \
Sean Paul6a55e9f2015-04-30 15:31:06 -040066 drmresources.cpp \
67 drmconnector.cpp \
68 drmcrtc.cpp \
Haixia Shiaa2f4a52015-11-02 10:54:29 -080069 drmdisplaycomposition.cpp \
70 drmdisplaycompositor.cpp \
Sean Paul6a55e9f2015-04-30 15:31:06 -040071 drmencoder.cpp \
Sean Paul047b9b22015-07-28 14:15:42 -040072 drmeventlistener.cpp \
Sean Pauled2ec4b2016-03-10 15:35:40 -050073 drmhwctwo.cpp \
Sean Paul6a55e9f2015-04-30 15:31:06 -040074 drmmode.cpp \
75 drmplane.cpp \
76 drmproperty.cpp \
Zach Reizner6cbe8832015-06-26 18:25:38 -070077 glworker.cpp \
Sean Pauled2ec4b2016-03-10 15:35:40 -050078 hwcutils.cpp \
79 platform.cpp \
80 platformdrmgeneric.cpp \
Haixia Shiaa2f4a52015-11-02 10:54:29 -080081 separate_rects.cpp \
Haixia Shid21f5282015-10-05 14:35:09 -070082 virtualcompositorworker.cpp \
Adrian Salidofa37f672017-02-16 10:29:46 -080083 vsyncworker.cpp
Sean Paulcd36a9e2015-01-22 18:01:18 -050084
Chih-Hung Hsieh13438002017-11-21 14:53:29 -080085LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags)
86
Sean Pauled2ec4b2016-03-10 15:35:40 -050087LOCAL_CPPFLAGS += \
88 -DHWC2_USE_CPP11 \
89 -DHWC2_INCLUDE_STRINGIFICATION
90
John Stultz499db602018-03-13 16:51:12 -070091
92ifeq ($(TARGET_PRODUCT),hikey960)
93LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER
94LOCAL_SRC_FILES += platformhisi.cpp
95LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/
Alistair Strachan71edaca2018-05-02 17:01:49 -070096else ifeq ($(TARGET_PRODUCT),hikey)
John Stultz499db602018-03-13 16:51:12 -070097LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER
98LOCAL_SRC_FILES += platformhisi.cpp
99LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/
Alistair Strachan71edaca2018-05-02 17:01:49 -0700100else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm)
101LOCAL_SRC_FILES += platformminigbm.cpp
102LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/
John Stultz499db602018-03-13 16:51:12 -0700103else
Sean Paulda6270d2015-06-01 14:11:52 -0400104LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER
John Stultz499db602018-03-13 16:51:12 -0700105endif
Sean Paulcd36a9e2015-01-22 18:01:18 -0500106
Sean Paule0c4c3d2015-01-20 16:56:04 -0500107LOCAL_MODULE := hwcomposer.drm
108LOCAL_MODULE_TAGS := optional
109LOCAL_MODULE_RELATIVE_PATH := hw
110LOCAL_MODULE_CLASS := SHARED_LIBRARIES
111LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX)
Rob Herring4f7dc9b2017-09-15 08:48:55 -0500112LOCAL_VENDOR_MODULE := true
113
Sean Paule0c4c3d2015-01-20 16:56:04 -0500114include $(BUILD_SHARED_LIBRARY)
Sean Paulcfc06cc2015-04-10 04:45:33 -0700115
Adrian Salidofa37f672017-02-16 10:29:46 -0800116include $(call all-makefiles-under,$(LOCAL_PATH))
Sean Paulcfc06cc2015-04-10 04:45:33 -0700117endif