1// Copyright 2022 The Android Open Source Project 2 3package { 4 default_applicable_licenses: ["external_sg3_utils_license"], 5} 6 7// See also https://spdx.org/licenses/ 8license { 9 name: "external_sg3_utils_license", 10 visibility: [":__subpackages__"], 11 license_kinds: [ 12 "SPDX-license-identifier-BSD-2-Clause", 13 "SPDX-license-identifier-BSD-2-Clause-NetBSD", 14 "SPDX-license-identifier-BSD-3-Clause", 15 "SPDX-license-identifier-GPL-2.0-only", 16 "SPDX-license-identifier-GPL-2.0-or-later", 17 "SPDX-license-identifier-GPL-3.0-or-later", 18 ], 19 license_text: [ 20 "LICENSE", 21 "COPYING", 22 ], 23} 24 25cc_defaults { 26 name: "sg3_utils-defaults", 27 cflags: [ 28 "-D_FILE_OFFSET_BITS=64", 29 "-D_LARGEFILE64_SOURCE", 30 "-Wextra", 31 "-Wall", 32 "-Werror", 33 ], 34 local_include_dirs: [ 35 "include", 36 ], 37 // vendor only. See also https://source.android.com/docs/core/architecture/bootloader/partitions/product-interfaces. 38 vendor: true, 39 target: { 40 host: { 41 enabled: false, 42 }, 43 windows: { 44 enabled: false, 45 }, 46 }, 47} 48 49cc_library { 50 name: "libsgutils2", 51 defaults: ["sg3_utils-defaults"], 52 srcs: [ 53 "lib/sg_lib.c", 54 "lib/sg_pr2serr.c", 55 "lib/sg_lib_data.c", 56 "lib/sg_lib_names.c", 57 "lib/sg_cmds_basic.c", 58 "lib/sg_cmds_basic2.c", 59 "lib/sg_cmds_extra.c", 60 "lib/sg_cmds_mmc.c", 61 "lib/sg_pt_common.c", 62 "lib/sg_json_builder.c", 63 // Linux only. 64 "lib/sg_pt_linux.c", 65 "lib/sg_io_linux.c", 66 "lib/sg_pt_linux_nvme.c", 67 ], 68} 69 70cc_binary { 71 name: "sg_read_buffer", 72 defaults: ["sg3_utils-defaults"], 73 srcs: ["src/sg_read_buffer.c"], 74 shared_libs: ["libsgutils2"], 75} 76 77cc_binary { 78 name: "sg_write_buffer", 79 defaults: ["sg3_utils-defaults"], 80 srcs: ["src/sg_write_buffer.c"], 81 shared_libs: ["libsgutils2"], 82} 83