OSDN Git Service

drm_hwcomposer: Add MediaTek platform support
[android-x86/external-drm_hwcomposer.git] / Android.bp
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
15 // =====================
16 // libdrmhwc_utils.a
17 // =====================
18 cc_library_static {
19     name: "libdrmhwc_utils",
20
21     srcs: ["utils/Worker.cpp"],
22
23     include_dirs: [
24         "external/drm_hwcomposer/include",
25         "external/drm_hwcomposer",
26     ],
27
28     cflags: [
29         "-Wall",
30         "-Werror",
31     ],
32
33     vendor: true,
34
35 }
36
37 // =====================
38 // hwcomposer.drm.so
39 // =====================
40 cc_defaults {
41     name: "hwcomposer.drm_defaults",
42
43     shared_libs: [
44         "libcutils",
45         "libdrm",
46         "libhardware",
47         "liblog",
48         "libsync",
49         "libui",
50         "libutils",
51     ],
52
53     include_dirs: [
54         "external/drm_hwcomposer/include",
55         "external/drm_hwcomposer",
56     ],
57
58     static_libs: ["libdrmhwc_utils"],
59
60     cflags: [
61         "-Wall",
62         "-Werror",
63     ],
64
65     cppflags: [
66         "-DHWC2_USE_CPP11",
67         "-DHWC2_INCLUDE_STRINGIFICATION",
68     ],
69
70     product_variables: {
71         platform_sdk_version: {
72             cflags: ["-DPLATFORM_SDK_VERSION=%d"],
73         },
74     },
75
76     relative_install_path: "hw",
77     vendor: true,
78 }
79 cc_library_static {
80     name: "drm_hwcomposer",
81     defaults: ["hwcomposer.drm_defaults"],
82     srcs: [
83         "DrmHwcTwo.cpp",
84
85         "compositor/DrmDisplayComposition.cpp",
86         "compositor/DrmDisplayCompositor.cpp",
87
88         "drm/DrmConnector.cpp",
89         "drm/DrmCrtc.cpp",
90         "drm/DrmDevice.cpp",
91         "drm/DrmEncoder.cpp",
92         "drm/DrmEventListener.cpp",
93         "drm/DrmMode.cpp",
94         "drm/DrmPlane.cpp",
95         "drm/DrmProperty.cpp",
96         "drm/ResourceManager.cpp",
97         "drm/VSyncWorker.cpp",
98
99         "platform/platform.cpp",
100
101         "utils/autolock.cpp",
102         "utils/hwcutils.cpp",
103
104         "backend/BackendManager.cpp",
105         "backend/Backend.cpp",
106         "backend/BackendClient.cpp",
107         "backend/BackendRCarDu.cpp",
108     ],
109 }
110
111 cc_library_shared {
112     name: "hwcomposer.drm",
113     defaults: ["hwcomposer.drm_defaults"],
114     whole_static_libs: ["drm_hwcomposer"],
115     srcs: ["platform/platformdrmgeneric.cpp"],
116     cppflags: ["-DUSE_DRM_GENERIC_IMPORTER"],
117 }
118
119 cc_library_shared {
120     name: "hwcomposer.drm_minigbm",
121     defaults: ["hwcomposer.drm_defaults"],
122     whole_static_libs: ["drm_hwcomposer"],
123     srcs: [
124         "platform/platformdrmgeneric.cpp",
125         "platform/platformminigbm.cpp",
126     ],
127     include_dirs: ["external/minigbm/cros_gralloc"],
128 }
129
130 // Used by hwcomposer.drm_imagination
131 filegroup {
132     name: "drm_hwcomposer_platformimagination",
133     srcs: [
134         "platform/platformdrmgeneric.cpp",
135         "platform/platformimagination.cpp",
136     ],
137 }
138
139 // Used by hwcomposer.drm_hikey and hwcomposer.drm_hikey960
140 filegroup {
141     name: "drm_hwcomposer_platformhisi",
142     srcs: [
143         "platform/platformdrmgeneric.cpp",
144         "platform/platformhisi.cpp",
145     ],
146 }
147
148 // Used by hwcomposer.drm_meson
149 filegroup {
150     name: "drm_hwcomposer_platformmeson",
151     srcs: [
152         "platform/platformdrmgeneric.cpp",
153         "platform/platformmeson.cpp",
154     ],
155 }
156
157 // Used by hwcomposer.drm_mediatek
158 filegroup {
159     name: "drm_hwcomposer_platformmediatek",
160     srcs: [
161         "platform/platformdrmgeneric.cpp",
162         "platform/platformmediatek.cpp",
163     ],
164 }