blob: 607395d5f222700ad9487efd73ae6a671fca9599 [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
Martin Stjernholm2ff21fd2019-01-31 20:50:23 +000034cc_defaults {
35 name: "libnativehelper_defaults",
Colin Crosscf47d9b2016-07-27 10:35:53 -070036 host_supported: true,
37 srcs: [
38 "JNIHelp.cpp",
39 "JniConstants.cpp",
Colin Crosscf47d9b2016-07-27 10:35:53 -070040 "JniInvocation.cpp",
Orion Hodsonaadb3732018-11-21 12:58:34 +000041 "toStringArray.cpp",
Colin Crosscf47d9b2016-07-27 10:35:53 -070042 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070043 target: {
Dan Willemsen7fe68952017-10-03 14:16:53 -070044 linux: {
Colin Crosscf47d9b2016-07-27 10:35:53 -070045 srcs: ["AsynchronousCloseMonitor.cpp"],
Colin Crosscf47d9b2016-07-27 10:35:53 -070046 },
Steve Austin5bb885b2018-07-18 14:21:18 -070047 fuchsia: {
48 srcs: ["AsynchronousCloseMonitor.cpp"],
49 },
Jiyong Park083b9202017-07-14 15:56:33 +090050 },
Colin Crosscf47d9b2016-07-27 10:35:53 -070051 shared_libs: [
52 "liblog",
53 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070054 cflags: [
55 "-Werror",
56 "-fvisibility=protected",
57 ],
Orion Hodsonb01e7fe2018-11-07 06:07:50 +000058 export_include_dirs: [
Martin Stjernholm2ff21fd2019-01-31 20:50:23 +000059 "include",
60 "header_only_include",
61 "platform_include"
Orion Hodsonb01e7fe2018-11-07 06:07:50 +000062 ],
Martin Stjernholm2ff21fd2019-01-31 20:50:23 +000063}
64
65cc_library {
66 name: "libnativehelper",
67 defaults: [ "libnativehelper_defaults" ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070068}
69
70//
71// NDK-only build for the target (device), using libc++.
72// - Relies only on NDK exposed functionality.
73// - This doesn't include JniInvocation.
74//
75
76cc_library_shared {
77 name: "libnativehelper_compat_libc++",
Steven Moreland3544a932017-07-19 10:26:05 -070078 export_include_dirs: [
Andreas Gamped299c072017-10-17 10:50:00 -070079 "header_only_include",
Steven Moreland3544a932017-07-19 10:26:05 -070080 "include",
Steven Moreland3544a932017-07-19 10:26:05 -070081 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070082 cflags: ["-Werror"],
Andreas Gamped299c072017-10-17 10:50:00 -070083 include_dirs: [
84 "libnativehelper/header_only_include",
85 "libnativehelper/platform_include",
86 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070087 srcs: [
88 "JNIHelp.cpp",
89 "JniConstants.cpp",
90 "toStringArray.cpp",
91 ],
92 shared_libs: [
93 "liblog",
Colin Crosscf47d9b2016-07-27 10:35:53 -070094 ],
95 sdk_version: "19",
96 stl: "c++_static",
97}
98
Dan Albert3cada472016-07-27 12:44:35 -070099ndk_headers {
100 name: "ndk_jni.h",
Steven Morelandab365e32017-07-18 13:24:41 -0700101 from: "include_jni",
Dan Albert3cada472016-07-27 12:44:35 -0700102 to: "",
Steven Morelandab365e32017-07-18 13:24:41 -0700103 srcs: ["include_jni/jni.h"],
Dan Alberta725dc62016-10-20 10:17:46 -0700104 license: "NOTICE",
Dan Albert3cada472016-07-27 12:44:35 -0700105}
106
Colin Crosscf47d9b2016-07-27 10:35:53 -0700107//
108// Tests.
109//
110
111subdirs = ["tests"]