Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 1 | // |
| 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 Badour | e1e2e96 | 2021-02-12 17:52:09 -0800 | [diff] [blame] | 24 | package { |
| 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 |
| 42 | license { |
| 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 Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 53 | subdirs = ["*"] |
| 54 | build = ["Android.sources.bp"] |
| 55 | |
| 56 | cc_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 Hughes | 267e2d8 | 2018-01-11 14:09:24 -0800 | [diff] [blame] | 66 | "-Wno-deprecated-declarations", |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 67 | "-Wno-format", |
| 68 | "-Wno-gnu-variable-sized-type-not-at-end", |
Jason Macnak | adc4cef | 2019-12-02 22:56:55 -0800 | [diff] [blame] | 69 | "-Wno-implicit-function-declaration", |
| 70 | "-Wno-int-conversion", |
| 71 | "-Wno-missing-field-initializers", |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 72 | "-Wno-pointer-arith", |
| 73 | "-Wno-unused-parameter", |
| 74 | "-Wno-unused-variable", |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 75 | ], |
Inseob Kim | 06b698c | 2020-06-11 14:05:17 +0900 | [diff] [blame] | 76 | export_system_include_dirs: ["."], |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 77 | } |
| 78 | |
Jason Macnak | a4a83ba | 2020-11-16 09:58:07 -0800 | [diff] [blame] | 79 | cc_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 Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 87 | // Library for the device |
| 88 | cc_library { |
| 89 | name: "libdrm", |
Jerry Zhang | d9aac04 | 2018-07-17 12:17:19 -0700 | [diff] [blame] | 90 | recovery_available: true, |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 91 | vendor_available: true, |
Jason Macnak | adc4cef | 2019-12-02 22:56:55 -0800 | [diff] [blame] | 92 | host_supported: true, |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 93 | defaults: [ |
| 94 | "libdrm_defaults", |
| 95 | "libdrm_sources", |
| 96 | ], |
| 97 | |
John Stultz | 915c5fa | 2018-04-13 16:26:43 -0700 | [diff] [blame] | 98 | export_include_dirs: ["include/drm", "android"], |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 99 | |
| 100 | cflags: [ |
| 101 | "-Wno-enum-conversion", |
| 102 | "-Wno-pointer-arith", |
| 103 | "-Wno-sign-compare", |
| 104 | "-Wno-tautological-compare", |
| 105 | ], |
Jiyong Park | bd80203 | 2020-12-07 15:08:36 +0900 | [diff] [blame] | 106 | apex_available: [ |
| 107 | "//apex_available:platform", |
| 108 | "com.android.virt", |
| 109 | ], |
Dan Willemsen | fa32e29 | 2017-10-19 22:18:23 -0700 | [diff] [blame] | 110 | } |