blob: dbac5626e3759db20a0338670e44bf93e4fa8a63 [file] [log] [blame]
Dan Willemsenfa32e292017-10-19 22:18:23 -07001//
2// Copyright © 2011-2012 Intel Corporation
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice (including the next
12// paragraph) shall be included in all copies or substantial portions of the
13// Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//
23
Bob Badoure1e2e962021-02-12 17:52:09 -080024package {
25 default_applicable_licenses: ["external_libdrm_license"],
26}
27
28// Added automatically by a large-scale-change that took the approach of
29// 'apply every license found to every target'. While this makes sure we respect
30// every license restriction, it may not be entirely correct.
31//
32// e.g. GPL in an MIT project might only apply to the contrib/ directory.
33//
34// Please consider splitting the single license below into multiple licenses,
35// taking care not to lose any license_kind information, and overriding the
36// default license using the 'licenses: [...]' property on targets as needed.
37//
38// For unused files, consider creating a 'fileGroup' with "//visibility:private"
39// to attach the license to, and including a comment whether the files may be
40// used in the current project.
41// See: http://go/android-license-faq
42license {
43 name: "external_libdrm_license",
44 visibility: [":__subpackages__"],
45 license_kinds: [
46 "SPDX-license-identifier-BSD",
47 "SPDX-license-identifier-MIT",
48 "legacy_unencumbered",
49 ],
50 // large-scale-change unable to identify any license_text files
51}
52
Dan Willemsenfa32e292017-10-19 22:18:23 -070053subdirs = ["*"]
54build = ["Android.sources.bp"]
55
56cc_defaults {
57 name: "libdrm_defaults",
58 cflags: [
59 // XXX: Consider moving these to config.h analogous to autoconf.
60 "-DMAJOR_IN_SYSMACROS=1",
61 "-DHAVE_VISIBILITY=1",
62 "-DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1",
63
64 "-Wall",
65 "-Werror",
Elliott Hughes267e2d82018-01-11 14:09:24 -080066 "-Wno-deprecated-declarations",
Dan Willemsenfa32e292017-10-19 22:18:23 -070067 "-Wno-format",
68 "-Wno-gnu-variable-sized-type-not-at-end",
Jason Macnakadc4cef2019-12-02 22:56:55 -080069 "-Wno-implicit-function-declaration",
70 "-Wno-int-conversion",
71 "-Wno-missing-field-initializers",
Dan Willemsenfa32e292017-10-19 22:18:23 -070072 "-Wno-pointer-arith",
73 "-Wno-unused-parameter",
74 "-Wno-unused-variable",
Dan Willemsenfa32e292017-10-19 22:18:23 -070075 ],
Inseob Kim06b698c2020-06-11 14:05:17 +090076 export_system_include_dirs: ["."],
Dan Willemsenfa32e292017-10-19 22:18:23 -070077}
78
Jason Macnaka4a83ba2020-11-16 09:58:07 -080079cc_library_headers {
80 name: "libdrm_headers",
81 vendor_available: true,
82 host_supported: true,
83 defaults: ["libdrm_defaults"],
84 export_include_dirs: ["include/drm", "android"],
85}
86
Dan Willemsenfa32e292017-10-19 22:18:23 -070087// Library for the device
88cc_library {
89 name: "libdrm",
Jerry Zhangd9aac042018-07-17 12:17:19 -070090 recovery_available: true,
Dan Willemsenfa32e292017-10-19 22:18:23 -070091 vendor_available: true,
Jason Macnakadc4cef2019-12-02 22:56:55 -080092 host_supported: true,
Dan Willemsenfa32e292017-10-19 22:18:23 -070093 defaults: [
94 "libdrm_defaults",
95 "libdrm_sources",
96 ],
97
John Stultz915c5fa2018-04-13 16:26:43 -070098 export_include_dirs: ["include/drm", "android"],
Dan Willemsenfa32e292017-10-19 22:18:23 -070099
100 cflags: [
101 "-Wno-enum-conversion",
102 "-Wno-pointer-arith",
103 "-Wno-sign-compare",
104 "-Wno-tautological-compare",
105 ],
Jiyong Parkbd802032020-12-07 15:08:36 +0900106 apex_available: [
107 "//apex_available:platform",
108 "com.android.virt",
109 ],
Dan Willemsenfa32e292017-10-19 22:18:23 -0700110}