Miao Wang | 43547b6 | 2017-12-07 14:11:43 -0800 | [diff] [blame] | 1 | // Copyright (C) 2017 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 3708cdc | 2021-02-12 20:28:57 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_tensorflow_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change that took the approach of |
| 20 | // 'apply every license found to every target'. While this makes sure we respect |
| 21 | // every license restriction, it may not be entirely correct. |
| 22 | // |
| 23 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 24 | // |
| 25 | // Please consider splitting the single license below into multiple licenses, |
| 26 | // taking care not to lose any license_kind information, and overriding the |
| 27 | // default license using the 'licenses: [...]' property on targets as needed. |
| 28 | // |
| 29 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 30 | // to attach the license to, and including a comment whether the files may be |
| 31 | // used in the current project. |
| 32 | // |
| 33 | // large-scale-change included anything that looked like it might be a license |
| 34 | // text as a license_text. e.g. LICENSE, NOTICE, COPYING etc. |
| 35 | // |
| 36 | // Please consider removing redundant or irrelevant files from 'license_text:'. |
| 37 | // |
| 38 | // large-scale-change filtered out the below license kinds as false-positives: |
| 39 | // SPDX-license-identifier-CC-BY-SA |
| 40 | // SPDX-license-identifier-MPL-2.0 |
| 41 | // See: http://go/android-license-faq |
| 42 | license { |
| 43 | name: "external_tensorflow_license", |
| 44 | visibility: [":__subpackages__"], |
| 45 | license_kinds: [ |
| 46 | "SPDX-license-identifier-Apache-2.0", |
| 47 | "SPDX-license-identifier-BSD", |
| 48 | "SPDX-license-identifier-MIT", |
| 49 | "legacy_unencumbered", |
| 50 | ], |
| 51 | license_text: [ |
| 52 | "LICENSE", |
| 53 | "NOTICE", |
| 54 | ], |
| 55 | } |
| 56 | |
Miao Wang | 43547b6 | 2017-12-07 14:11:43 -0800 | [diff] [blame] | 57 | cc_library_headers { |
| 58 | name: "tensorflow_headers", |
| 59 | export_include_dirs: ["."], |
Miao Wang | a07e14c | 2017-12-14 15:30:54 -0800 | [diff] [blame] | 60 | vendor_available: true, |
Shih-Ming Wang | 7e98d51 | 2021-01-29 17:19:18 -0800 | [diff] [blame] | 61 | host_supported: true, |
Tony Mak | e25f94d | 2019-06-12 15:54:10 +0100 | [diff] [blame] | 62 | sdk_version: "current", |
Przemyslaw Szczepaniak | e549a69 | 2020-01-31 15:46:22 +0000 | [diff] [blame] | 63 | apex_available: [ |
Lev Proleev | a491998 | 2021-02-26 20:30:08 +0000 | [diff] [blame] | 64 | "//apex_available:platform", |
| 65 | "com.android.extservices", |
Przemyslaw Szczepaniak | e549a69 | 2020-01-31 15:46:22 +0000 | [diff] [blame] | 66 | "com.android.neuralnetworks", |
| 67 | "test_com.android.neuralnetworks", |
Przemyslaw Szczepaniak | e549a69 | 2020-01-31 15:46:22 +0000 | [diff] [blame] | 68 | ], |
Miao Wang | 43547b6 | 2017-12-07 14:11:43 -0800 | [diff] [blame] | 69 | } |
| 70 | |
Lev Proleev | a491998 | 2021-02-26 20:30:08 +0000 | [diff] [blame] | 71 | genrule { |
| 72 | name: "libtflite_mutable_schema", |
| 73 | tools: ["flatc"], |
| 74 | cmd: "$(location flatc) --cpp --no-union-value-namespacing --gen-object-api --gen-mutable --keep-prefix -o $$(dirname $(out)) $(in)", |
| 75 | srcs: [ "tensorflow/lite/schema/schema.fbs" ], |
| 76 | out: [ "tensorflow/lite/schema/mutable/schema_generated.h" ], |
| 77 | } |
| 78 | |
Miao Wang | aa0a298 | 2019-01-17 18:35:59 -0800 | [diff] [blame] | 79 | subdirs = ["tensorflow/lite"] |
Yuntao Xu | 34a8a2b | 2021-05-19 19:52:49 -0700 | [diff] [blame] | 80 | |
| 81 | cc_library_static { |
| 82 | name: "TfliteNnapiDelegateTests_static", |
| 83 | srcs: [ |
| 84 | "tensorflow/lite/delegates/nnapi/nnapi_delegate_test.cc", |
| 85 | "tensorflow/lite/kernels/test_util.cc", |
| 86 | "tensorflow/core/platform/default/logging.cc", |
| 87 | "tensorflow/core/platform/default/env_time.cc", |
| 88 | "tensorflow/lite/kernels/acceleration_test_util.cc", |
| 89 | "tensorflow/lite/kernels/acceleration_test_util_internal.cc", |
| 90 | "tensorflow/lite/delegates/nnapi/acceleration_test_list.cc", |
| 91 | "tensorflow/lite/delegates/nnapi/acceleration_test_util.cc", |
| 92 | ], |
| 93 | include_dirs: [ |
| 94 | "external/flatbuffers/include", |
| 95 | "external/tensorflow", |
| 96 | "external/ruy", |
| 97 | ], |
| 98 | cflags: [ |
| 99 | "-DPLATFORM_POSIX_ANDROID", |
| 100 | "-Wextra", |
| 101 | "-Wno-extern-c-compat", |
| 102 | "-Wno-sign-compare", |
| 103 | "-Wno-unused-parameter", |
| 104 | "-Wno-unused-private-field", |
| 105 | ], |
| 106 | shared_libs: [ |
| 107 | "libandroid", |
| 108 | "liblog", |
| 109 | "libneuralnetworks", |
| 110 | ], |
| 111 | static_libs: [ |
| 112 | "libgtest_ndk_c++", |
| 113 | "libgmock_ndk", |
| 114 | "libtflite_static", |
| 115 | ], |
| 116 | header_libs: [ |
| 117 | "libeigen", |
| 118 | "gemmlowp_headers", |
| 119 | "libtflite_schema_headers", |
| 120 | ], |
| 121 | sdk_version: "current", |
| 122 | stl: "c++_static", |
| 123 | } |