From 8c1b1c2a06e4255b7113e32ef782faeb120dc719 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 23 Nov 2022 15:22:04 -0800 Subject: Add Android.bp Change-Id: Idfcbfb3a2a03bda1abe5ec6d4c657b0a171377f6 Signed-off-by: Bart Van Assche --- Android.bp | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Android.bp (limited to 'Android.bp') diff --git a/Android.bp b/Android.bp new file mode 100644 index 00000000..ec32bdae --- /dev/null +++ b/Android.bp @@ -0,0 +1,82 @@ +// Copyright 2022 The Android Open Source Project + +package { + default_applicable_licenses: ["LICENSE"], +} + +// See also https://spdx.org/licenses/ +license { + name: "LICENSE", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-BSD-2-Clause", + "SPDX-license-identifier-BSD-2-Clause-NetBSD", + "SPDX-license-identifier-BSD-3-Clause", + "SPDX-license-identifier-GPL-2.0-only", + "SPDX-license-identifier-GPL-2.0-or-later", + "SPDX-license-identifier-GPL-3.0-or-later", + ], + license_text: [ + "LICENSE", + "COPYING", + ], +} + +cc_defaults { + name: "sg3_utils-defaults", + cflags: [ + "-D_FILE_OFFSET_BITS=64", + "-D_LARGEFILE64_SOURCE", + "-Wextra", + "-Wall", + "-Werror", + ], + local_include_dirs: [ + "include", + ], + // Core only. See also https://source.android.com/docs/core/architecture/bootloader/partitions/product-interfaces. + system_ext_specific: true, + target: { + host: { + enabled: false, + }, + windows: { + enabled: false, + }, + }, +} + +cc_library { + name: "libsgutils2", + defaults: ["sg3_utils-defaults"], + srcs: [ + "lib/sg_lib.c", + "lib/sg_pr2serr.c", + "lib/sg_lib_data.c", + "lib/sg_lib_names.c", + "lib/sg_cmds_basic.c", + "lib/sg_cmds_basic2.c", + "lib/sg_cmds_extra.c", + "lib/sg_cmds_mmc.c", + "lib/sg_pt_common.c", + "lib/sg_json_builder.c", + // Linux only. + "lib/sg_pt_linux.c", + "lib/sg_io_linux.c", + "lib/sg_pt_linux_nvme.c", + ], +} + +cc_binary { + name: "sg_read_buffer", + defaults: ["sg3_utils-defaults"], + srcs: ["src/sg_read_buffer.c"], + shared_libs: ["libsgutils2"], +} + +cc_binary { + name: "sg_write_buffer", + defaults: ["sg3_utils-defaults"], + srcs: ["src/sg_write_buffer.c"], + shared_libs: ["libsgutils2"], +} -- cgit v1.2.3