Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 1 | # 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 Paul | cfc06cc | 2015-04-10 04:45:33 -0700 | [diff] [blame] | 15 | ifeq ($(strip $(BOARD_USES_DRM_HWCOMPOSER)),true) |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 16 | |
John Stultz | fb3599c | 2018-08-21 11:21:56 -0700 | [diff] [blame] | 17 | DRM_HWC_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION))) |
| 18 | |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 19 | LOCAL_PATH := $(call my-dir) |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 20 | |
Chih-Hung Hsieh | 1343800 | 2017-11-21 14:53:29 -0800 | [diff] [blame] | 21 | common_drm_hwcomposer_cflags := \ |
| 22 | -Wall \ |
| 23 | -Werror \ |
Chih-Hung Hsieh | 1343800 | 2017-11-21 14:53:29 -0800 | [diff] [blame] | 24 | |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 25 | # ===================== |
| 26 | # libdrmhwc_utils.a |
| 27 | # ===================== |
| 28 | include $(CLEAR_VARS) |
| 29 | |
| 30 | LOCAL_SRC_FILES := \ |
| 31 | worker.cpp |
| 32 | |
Chih-Hung Hsieh | 1343800 | 2017-11-21 14:53:29 -0800 | [diff] [blame] | 33 | LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags) |
| 34 | |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 35 | LOCAL_MODULE := libdrmhwc_utils |
Sumit Semwal | 94bb596 | 2018-04-26 12:05:54 -0700 | [diff] [blame] | 36 | LOCAL_VENDOR_MODULE := true |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 37 | |
| 38 | include $(BUILD_STATIC_LIBRARY) |
| 39 | |
| 40 | # ===================== |
| 41 | # hwcomposer.drm.so |
| 42 | # ===================== |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 43 | include $(CLEAR_VARS) |
| 44 | |
| 45 | LOCAL_SHARED_LIBRARIES := \ |
Lauri Peltonen | 64717b2 | 2015-02-04 16:55:31 +0200 | [diff] [blame] | 46 | libcutils \ |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 47 | libdrm \ |
| 48 | libhardware \ |
| 49 | liblog \ |
Sean Paul | 9aa5ad3 | 2015-01-22 15:47:54 -0500 | [diff] [blame] | 50 | libsync \ |
Zach Reizner | 45624d3 | 2015-06-10 16:03:01 -0700 | [diff] [blame] | 51 | libui \ |
| 52 | libutils |
| 53 | |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 54 | LOCAL_STATIC_LIBRARIES := libdrmhwc_utils |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 55 | |
| 56 | LOCAL_C_INCLUDES := \ |
Rob Herring | 60d1d4f | 2017-10-24 19:06:43 -0500 | [diff] [blame] | 57 | system/core/libsync |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 58 | |
Sean Paul | 6a55e9f | 2015-04-30 15:31:06 -0400 | [diff] [blame] | 59 | LOCAL_SRC_FILES := \ |
Zach Reizner | 49446bc | 2015-11-13 16:09:39 -0800 | [diff] [blame] | 60 | autolock.cpp \ |
Alexandru Gheorghe | c546358 | 2018-03-27 15:52:02 +0100 | [diff] [blame] | 61 | resourcemanager.cpp \ |
Alexandru Gheorghe | 0f5abd7 | 2018-05-01 14:37:10 +0100 | [diff] [blame] | 62 | drmdevice.cpp \ |
Sean Paul | 6a55e9f | 2015-04-30 15:31:06 -0400 | [diff] [blame] | 63 | drmconnector.cpp \ |
| 64 | drmcrtc.cpp \ |
Haixia Shi | aa2f4a5 | 2015-11-02 10:54:29 -0800 | [diff] [blame] | 65 | drmdisplaycomposition.cpp \ |
| 66 | drmdisplaycompositor.cpp \ |
Sean Paul | 6a55e9f | 2015-04-30 15:31:06 -0400 | [diff] [blame] | 67 | drmencoder.cpp \ |
Sean Paul | 047b9b2 | 2015-07-28 14:15:42 -0400 | [diff] [blame] | 68 | drmeventlistener.cpp \ |
Sean Paul | ed2ec4b | 2016-03-10 15:35:40 -0500 | [diff] [blame] | 69 | drmhwctwo.cpp \ |
Sean Paul | 6a55e9f | 2015-04-30 15:31:06 -0400 | [diff] [blame] | 70 | drmmode.cpp \ |
| 71 | drmplane.cpp \ |
| 72 | drmproperty.cpp \ |
Sean Paul | ed2ec4b | 2016-03-10 15:35:40 -0500 | [diff] [blame] | 73 | hwcutils.cpp \ |
| 74 | platform.cpp \ |
| 75 | platformdrmgeneric.cpp \ |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 76 | vsyncworker.cpp |
Sean Paul | cd36a9e | 2015-01-22 18:01:18 -0500 | [diff] [blame] | 77 | |
Chih-Hung Hsieh | 1343800 | 2017-11-21 14:53:29 -0800 | [diff] [blame] | 78 | LOCAL_CFLAGS := $(common_drm_hwcomposer_cflags) |
| 79 | |
Sean Paul | ed2ec4b | 2016-03-10 15:35:40 -0500 | [diff] [blame] | 80 | LOCAL_CPPFLAGS += \ |
| 81 | -DHWC2_USE_CPP11 \ |
| 82 | -DHWC2_INCLUDE_STRINGIFICATION |
| 83 | |
John Stultz | fb3599c | 2018-08-21 11:21:56 -0700 | [diff] [blame] | 84 | ifneq ($(filter 2 3 4 5 6 7 8, $(DRM_HWC_ANDROID_MAJOR_VERSION)),) |
| 85 | LOCAL_CPPFLAGS += -DHWC2_USE_OLD_GB_IMPORT |
| 86 | endif |
| 87 | |
John Stultz | 499db60 | 2018-03-13 16:51:12 -0700 | [diff] [blame] | 88 | |
| 89 | ifeq ($(TARGET_PRODUCT),hikey960) |
| 90 | LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER |
| 91 | LOCAL_SRC_FILES += platformhisi.cpp |
| 92 | LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/ |
Alistair Strachan | 71edaca | 2018-05-02 17:01:49 -0700 | [diff] [blame] | 93 | else ifeq ($(TARGET_PRODUCT),hikey) |
John Stultz | 499db60 | 2018-03-13 16:51:12 -0700 | [diff] [blame] | 94 | LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER |
| 95 | LOCAL_SRC_FILES += platformhisi.cpp |
| 96 | LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/ |
Alistair Strachan | 71edaca | 2018-05-02 17:01:49 -0700 | [diff] [blame] | 97 | else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm) |
| 98 | LOCAL_SRC_FILES += platformminigbm.cpp |
| 99 | LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/ |
John Stultz | 499db60 | 2018-03-13 16:51:12 -0700 | [diff] [blame] | 100 | else |
Sean Paul | da6270d | 2015-06-01 14:11:52 -0400 | [diff] [blame] | 101 | LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER |
John Stultz | 499db60 | 2018-03-13 16:51:12 -0700 | [diff] [blame] | 102 | endif |
Sean Paul | cd36a9e | 2015-01-22 18:01:18 -0500 | [diff] [blame] | 103 | |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 104 | LOCAL_MODULE := hwcomposer.drm |
| 105 | LOCAL_MODULE_TAGS := optional |
| 106 | LOCAL_MODULE_RELATIVE_PATH := hw |
| 107 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 108 | LOCAL_MODULE_SUFFIX := $(TARGET_SHLIB_SUFFIX) |
Rob Herring | 4f7dc9b | 2017-09-15 08:48:55 -0500 | [diff] [blame] | 109 | LOCAL_VENDOR_MODULE := true |
| 110 | |
Sean Paul | e0c4c3d | 2015-01-20 16:56:04 -0500 | [diff] [blame] | 111 | include $(BUILD_SHARED_LIBRARY) |
Sean Paul | cfc06cc | 2015-04-10 04:45:33 -0700 | [diff] [blame] | 112 | |
Adrian Salido | fa37f67 | 2017-02-16 10:29:46 -0800 | [diff] [blame] | 113 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Sean Paul | cfc06cc | 2015-04-10 04:45:33 -0700 | [diff] [blame] | 114 | endif |