1/*
2 * Copyright 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17cc_defaults {
18    name: "libnnbenchmark_jni_defaults",
19    sdk_version: "current",
20    srcs: [
21        "benchmark_jni.cpp",
22        "crashtest_jni.cpp",
23        "run_tflite.cpp",
24    ],
25    header_libs: [
26        "flatbuffer_headers",
27        "jni_headers",
28        "tensorflow_headers",
29    ],
30    shared_libs: [
31        "liblog",
32    ],
33    static_libs: [
34        "libtflite_static",
35    ],
36    cflags: [
37        "-Wno-sign-compare",
38        "-Wno-unused-parameter",
39    ],
40    stl: "libc++_static",
41    strip: {
42        keep_symbols: true,
43    },
44}
45
46cc_library_shared {
47    name: "libnnbenchmark_jni",
48    defaults: ["libnnbenchmark_jni_defaults"],
49}
50
51cc_library_static {
52    name: "libnnbenchmark_jni_static",
53    defaults: ["libnnbenchmark_jni_defaults"],
54    export_include_dirs: ["."],
55}
56
57cc_library {
58    name: "librandom_graph_test_jni",
59    defaults: ["neuralnetworks_float16"],
60    srcs: [
61        "random_graph_test_jni.cpp",
62    ],
63    header_libs: [
64        "jni_headers",
65        "libneuralnetworks_headers_ndk",
66        "libneuralnetworks_generated_test_harness_headers_for_cts",
67    ],
68    shared_libs: [
69        "libandroid",
70        "liblog",
71        "libneuralnetworks",
72    ],
73    whole_static_libs: [
74        "NeuralNetworksTest_random_graph",
75    ],
76    static_libs: [
77        "libbase_ndk",
78        "libgmock_ndk",
79        "libgtest_ndk_c++",
80    ],
81    cflags: [
82        "-Wno-sign-compare",
83        "-Wno-unused-parameter",
84    ],
85    sdk_version: "current",
86    stl: "libc++_static",
87    strip: {
88        keep_symbols: true,
89    },
90}
91