1// Copyright 2021 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//
15//
16//#################################
17package {
18    default_team: "trendy_team_aaos_framework",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_library_shared {
23    name: "libcarservicejni",
24    defaults: ["android.hardware.graphics.common-ndk_shared"],
25    srcs: [
26        "JniLoader.cpp",
27        "evs/**/*.cpp",
28    ],
29
30    shared_libs: [
31        "android.hardware.automotive.evs-V2-ndk",
32        "android.hardware.common-V2-ndk",
33        "libandroid",
34        "libbase",
35        "libbinder_ndk",
36        "liblog",
37        "libnativehelper",
38        "libnativewindow",
39        "libutils",
40    ],
41
42    min_sdk_version: "31",
43    apex_available: [
44        "//apex_available:platform",
45        "com.android.car.framework",
46    ],
47
48    strip: {
49        keep_symbols: true,
50    },
51
52    cflags: [
53        "-DLOG_TAG=\"CarServiceJNI\"",
54        "-Wall",
55        "-Werror",
56        "-Wthread-safety",
57        "-Wunused",
58        "-Wunreachable-code",
59        "-fvisibility=hidden",
60    ],
61}
62
63cc_test_library {
64    name: "libcarservicejni_test",
65    defaults: ["android.hardware.graphics.common-ndk_static"],
66    srcs: [
67        "JniLoader.cpp",
68        "evs/**/*.cpp",
69        "test-libs/**/*.cpp",
70    ],
71
72    shared_libs: [
73        "libandroid",
74        "libbase",
75        "libbinder_ndk",
76        "libcamera_client",
77        "libcamera_metadata",
78        "liblog",
79        "libnativehelper",
80        "libnativewindow",
81        "libui",
82        "libutils",
83    ],
84
85    static_libs: [
86        "android.hardware.automotive.evs-V2-ndk",
87        "android.hardware.common-V2-ndk",
88        "libaidlcommonsupport",
89        "libcutils",
90        "libgmock",
91        "libmockevshal",
92    ],
93
94    local_include_dirs: [
95        "evs",
96        "test-libs",
97    ],
98
99    min_sdk_version: "31",
100    apex_available: [
101        "//apex_available:platform",
102        "com.android.car.framework",
103    ],
104
105    strip: {
106        keep_symbols: true,
107    },
108
109    cflags: [
110        "-D__TEST__",
111        "-Wall",
112        "-Werror",
113        "-Wunused",
114        "-Wunreachable-code",
115        "-fvisibility=hidden",
116    ],
117}
118