blob: bd9f2781211dd1fdfd7fee38baedcd4e9c33065f [file] [log] [blame]
Colin Crosscf47d9b2016-07-27 10:35:53 -07001// Copyright (C) 2009 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
Jiyong Park083b9202017-07-14 15:56:33 +090015cc_library_headers {
16 name: "jni_headers",
17 host_supported: true,
18 export_include_dirs: ["include_jni"],
19 vendor_available: true,
20}
21
Andreas Gampe12afda42017-08-23 11:26:30 -070022cc_library_headers {
Andreas Gamped299c072017-10-17 10:50:00 -070023 name: "libnativehelper_header_only",
24 host_supported: true,
25 export_include_dirs: ["header_only_include"],
26}
27
28cc_library_headers {
Andreas Gampe12afda42017-08-23 11:26:30 -070029 name: "jni_platform_headers",
30 host_supported: true,
31 export_include_dirs: ["platform_include"],
32}
33
Colin Crosscf47d9b2016-07-27 10:35:53 -070034cc_library {
35 name: "libnativehelper",
36 host_supported: true,
37 srcs: [
38 "JNIHelp.cpp",
39 "JniConstants.cpp",
40 "toStringArray.cpp",
41 "JniInvocation.cpp",
42 ],
43
44 target: {
Dan Willemsen7fe68952017-10-03 14:16:53 -070045 linux: {
Colin Crosscf47d9b2016-07-27 10:35:53 -070046 srcs: ["AsynchronousCloseMonitor.cpp"],
Colin Crosscf47d9b2016-07-27 10:35:53 -070047 },
Jiyong Park083b9202017-07-14 15:56:33 +090048 },
49
Andreas Gamped299c072017-10-17 10:50:00 -070050 header_libs: [
51 "jni_headers",
52 "libnativehelper_header_only",
53 "jni_platform_headers"
54 ],
55 export_header_lib_headers: [
56 "jni_headers",
57 "libnativehelper_header_only",
58 "jni_platform_headers",
59 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070060
61 shared_libs: [
62 "liblog",
63 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070064 cflags: [
65 "-Werror",
66 "-fvisibility=protected",
67 ],
Jiyong Park083b9202017-07-14 15:56:33 +090068
Andreas Gamped299c072017-10-17 10:50:00 -070069 export_include_dirs: ["include"],
Colin Crosscf47d9b2016-07-27 10:35:53 -070070}
71
72//
73// NDK-only build for the target (device), using libc++.
74// - Relies only on NDK exposed functionality.
75// - This doesn't include JniInvocation.
76//
77
78cc_library_shared {
79 name: "libnativehelper_compat_libc++",
Steven Moreland3544a932017-07-19 10:26:05 -070080 export_include_dirs: [
Andreas Gamped299c072017-10-17 10:50:00 -070081 "header_only_include",
Steven Moreland3544a932017-07-19 10:26:05 -070082 "include",
Steven Moreland3544a932017-07-19 10:26:05 -070083 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070084 cflags: ["-Werror"],
Andreas Gamped299c072017-10-17 10:50:00 -070085 include_dirs: [
86 "libnativehelper/header_only_include",
87 "libnativehelper/platform_include",
88 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070089 srcs: [
90 "JNIHelp.cpp",
91 "JniConstants.cpp",
92 "toStringArray.cpp",
93 ],
94 shared_libs: [
95 "liblog",
96 "libdl",
97 ],
98 sdk_version: "19",
99 stl: "c++_static",
100}
101
Dan Albert3cada472016-07-27 12:44:35 -0700102ndk_headers {
103 name: "ndk_jni.h",
Steven Morelandab365e32017-07-18 13:24:41 -0700104 from: "include_jni",
Dan Albert3cada472016-07-27 12:44:35 -0700105 to: "",
Steven Morelandab365e32017-07-18 13:24:41 -0700106 srcs: ["include_jni/jni.h"],
Dan Alberta725dc62016-10-20 10:17:46 -0700107 license: "NOTICE",
Dan Albert3cada472016-07-27 12:44:35 -0700108}
109
Colin Crosscf47d9b2016-07-27 10:35:53 -0700110//
111// Tests.
112//
113
114subdirs = ["tests"]