diff options
author | Bart Van Assche <bvanassche@google.com> | 2022-11-23 15:22:04 -0800 |
---|---|---|
committer | Bart Van Assche <bvanassche@google.com> | 2022-11-28 11:48:22 -0800 |
commit | 8c1b1c2a06e4255b7113e32ef782faeb120dc719 (patch) | |
tree | 0aa714114d62903a9a8e0aeaae7fcd224775532a | |
parent | 18b1b2ee6c4a4d36ffa62bd03c007953ee41ff25 (diff) | |
download | sg3_utils-8c1b1c2a06e4255b7113e32ef782faeb120dc719.tar.gz |
Add Android.bp
Change-Id: Idfcbfb3a2a03bda1abe5ec6d4c657b0a171377f6
Signed-off-by: Bart Van Assche <bvanassche@google.com>
-rw-r--r-- | Android.bp | 82 |
1 files changed, 82 insertions, 0 deletions
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"], +} |