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 15package { 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 42license { 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 57cc_library_headers { 58 name: "tensorflow_headers", 59 export_include_dirs: ["."], 60 vendor_available: true, 61 host_supported: true, 62 sdk_version: "current", 63 apex_available: [ 64 "//apex_available:platform", 65 "com.android.extservices", 66 "com.android.neuralnetworks", 67 "test_com.android.neuralnetworks", 68 ], 69} 70 71genrule { 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 79subdirs = ["tensorflow/lite"] 80 81cc_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} 124