1// 2// Copyright (C) 2024 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["external_libdisplay_info_license"], 19} 20 21license { 22 name: "external_libdisplay_info_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-MIT", 26 ], 27 license_text: [ 28 "LICENSE", 29 ], 30} 31 32// Generate empty id file rather than importing hwdata library 33genrule { 34 name: "pnp-ids", 35 cmd: "touch $(out)", 36 out: ["pnp.ids"], 37} 38 39genrule { 40 name: "pnp-id-table", 41 srcs: [":pnp-ids"], 42 tool_files: ["tool/gen-search-table.py"], 43 cmd: "$(location tool/gen-search-table.py) $(in) $(out) pnp_id_table", 44 out: ["pnp-id-table.c"], 45} 46 47// libdisplay_info 48cc_library_static { 49 name: "libdisplay_info", 50 vendor_available: true, 51 52 visibility: [ 53 ":__subpackages__", 54 "//external/drm_hwcomposer:__subpackages__", 55 "//device/amlogic/yukawa/hal/gralloc", 56 "//device/linaro:__subpackages__", 57 "//vendor:__subpackages__", 58 ], 59 60 export_include_dirs: [ 61 "include", 62 ], 63 64 c_std: "c11", 65 66 srcs: [ 67 "cta.c", 68 "cta-vic-table.c", 69 "cvt.c", 70 "displayid.c", 71 "dmt-table.c", 72 "edid.c", 73 "gtf.c", 74 "info.c", 75 "log.c", 76 "memory-stream.c", 77 ], 78 generated_sources: ["pnp-id-table"], 79} 80 81cc_binary { 82 name: "di-edid-decode", 83 vendor_available: true, 84 srcs: [ 85 "di-edid-decode/cta.c", 86 "di-edid-decode/displayid.c", 87 "di-edid-decode/edid.c", 88 "di-edid-decode/main.c", 89 ], 90 static_libs: [ 91 "libdisplay_info", 92 ], 93} 94