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 24package { 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 53subdirs = ["*"] 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", 66 "-Wno-deprecated-declarations", 67 "-Wno-format", 68 "-Wno-gnu-variable-sized-type-not-at-end", 69 "-Wno-implicit-function-declaration", 70 "-Wno-int-conversion", 71 "-Wno-missing-field-initializers", 72 "-Wno-pointer-arith", 73 "-Wno-unused-parameter", 74 "-Wno-unused-variable", 75 ], 76 export_system_include_dirs: ["."], 77} 78 79cc_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 87// Library for the device 88cc_library { 89 name: "libdrm", 90 recovery_available: true, 91 vendor_available: true, 92 host_supported: true, 93 defaults: [ 94 "libdrm_defaults", 95 "libdrm_sources", 96 ], 97 98 export_include_dirs: ["include/drm", "android"], 99 100 cflags: [ 101 "-Wno-enum-conversion", 102 "-Wno-pointer-arith", 103 "-Wno-sign-compare", 104 "-Wno-tautological-compare", 105 ], 106 apex_available: [ 107 "//apex_available:platform", 108 "com.android.virt", 109 ], 110} 111