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 // See: http://go/android-license-faq 19 // A large-scale-change added 'default_applicable_licenses' to import 20 // all of the 'license_kinds' from "device_generic_goldfish-opengl_license" 21 // to get the below license kinds: 22 // SPDX-license-identifier-Apache-2.0 23 default_applicable_licenses: ["device_generic_goldfish_license"], 24} 25 26cc_defaults { 27 name: "gralloc_defaults", 28 relative_install_path: "hw", 29 vendor: true, 30 static_libs: [ 31 "mesa_goldfish_address_space", 32 "mesa_util", 33 ], 34 shared_libs: [ 35 "android.hardware.graphics.allocator-V2-ndk", 36 "libbase", 37 "libcutils", 38 "libdrm", 39 "liblog", 40 "libutils", 41 "libOpenglCodecCommon", 42 "libOpenglSystemCommon", 43 ], 44 header_libs: [ 45 "libdebug.ranchu", 46 "libgralloc_cb.ranchu", 47 ], 48 cflags: [ 49 "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", 50 ], 51} 52 53cc_library_shared { 54 name: "mapper.ranchu", 55 defaults: ["gralloc_defaults"], 56 srcs: ["mapper.cpp"], 57 shared_libs: [ 58 "libsync", 59 "libandroidemu", 60 ], 61 header_libs: [ 62 "libbase_headers", 63 "libimapper_stablec", 64 "libimapper_providerutils", 65 ], 66 cflags: [ 67 "-DLOG_TAG=\"mapper.ranchu\"", 68 ], 69} 70 71cc_binary { 72 name: "android.hardware.graphics.allocator-service.ranchu", 73 defaults: ["gralloc_defaults"], 74 srcs: ["allocator.cpp"], 75 init_rc: ["android.hardware.graphics.allocator-service.ranchu.rc"], 76 vintf_fragments: ["android.hardware.graphics.gralloc.ranchu.xml"], 77 shared_libs: [ 78 "libbinder_ndk", 79 "libqemupipe.ranchu", 80 ], 81 static_libs: [ 82 "libaidlcommonsupport", 83 ], 84 required: [ 85 "mapper.ranchu", 86 ], 87 cflags: [ 88 "-DLOG_TAG=\"allocator-service.ranchu\"", 89 ], 90} 91