diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-12-15 20:06:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-12-15 20:06:57 +0000 |
commit | c185c9adb79a81b35ea7367b478b47e8aa7e1be7 (patch) | |
tree | 0aa714114d62903a9a8e0aeaae7fcd224775532a /Android.bp | |
parent | faa4fa5566575b7abfecae3ce07ce02229ea6e84 (diff) | |
parent | 8c1b1c2a06e4255b7113e32ef782faeb120dc719 (diff) | |
download | sg3_utils-c185c9adb79a81b35ea7367b478b47e8aa7e1be7.tar.gz |
Merge "Add Android.bp"
Diffstat (limited to 'Android.bp')
-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"], +} |