blob: dd5603cbad87033ce2a1c6a1b73f20812b16299d [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,
Jerome Gaillardf0d42052019-03-12 15:17:22 +000020 target: {
21 windows: {
22 enabled: true,
23 },
24 },
Jiyong Park083b9202017-07-14 15:56:33 +090025}
26
Andreas Gampe12afda42017-08-23 11:26:30 -070027cc_library_headers {
Andreas Gamped299c072017-10-17 10:50:00 -070028 name: "libnativehelper_header_only",
29 host_supported: true,
30 export_include_dirs: ["header_only_include"],
Jerome Gaillardf0d42052019-03-12 15:17:22 +000031 target: {
32 windows: {
33 enabled: true,
34 },
35 },
Paul Duffin22612b42019-07-16 15:25:32 +010036 sdk_version: "current",
Andreas Gamped299c072017-10-17 10:50:00 -070037}
38
39cc_library_headers {
Andreas Gampe12afda42017-08-23 11:26:30 -070040 name: "jni_platform_headers",
41 host_supported: true,
42 export_include_dirs: ["platform_include"],
Jerome Gaillardf0d42052019-03-12 15:17:22 +000043 target: {
44 windows: {
45 enabled: true,
46 },
47 },
Andreas Gampe12afda42017-08-23 11:26:30 -070048}
49
Martin Stjernholm8f6839c2019-02-05 15:06:45 +000050cc_library {
51 name: "libnativehelper",
Colin Crosscf47d9b2016-07-27 10:35:53 -070052 host_supported: true,
53 srcs: [
54 "JNIHelp.cpp",
55 "JniConstants.cpp",
Colin Crosscf47d9b2016-07-27 10:35:53 -070056 "JniInvocation.cpp",
Orion Hodsonaadb3732018-11-21 12:58:34 +000057 "toStringArray.cpp",
Colin Crosscf47d9b2016-07-27 10:35:53 -070058 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070059 shared_libs: [
Jerome Gaillardf0d42052019-03-12 15:17:22 +000060 "libbase",
Colin Crosscf47d9b2016-07-27 10:35:53 -070061 "liblog",
62 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070063 cflags: [
64 "-Werror",
65 "-fvisibility=protected",
66 ],
Orion Hodsonb01e7fe2018-11-07 06:07:50 +000067 export_include_dirs: [
Martin Stjernholm8f6839c2019-02-05 15:06:45 +000068 "include",
69 "header_only_include",
Paul Duffine3cee242019-07-16 20:03:03 +010070 "platform_include",
Orion Hodsonb01e7fe2018-11-07 06:07:50 +000071 ],
Martin Stjernholm8f6839c2019-02-05 15:06:45 +000072 stubs: {
73 symbol_file: "libnativehelper.map.txt",
74 versions: ["1"],
75 },
Jerome Gaillardf0d42052019-03-12 15:17:22 +000076 target: {
77 windows: {
78 enabled: true,
79 },
80 },
Colin Crosscf47d9b2016-07-27 10:35:53 -070081}
82
83//
84// NDK-only build for the target (device), using libc++.
85// - Relies only on NDK exposed functionality.
86// - This doesn't include JniInvocation.
87//
88
89cc_library_shared {
90 name: "libnativehelper_compat_libc++",
Steven Moreland3544a932017-07-19 10:26:05 -070091 export_include_dirs: [
Andreas Gamped299c072017-10-17 10:50:00 -070092 "header_only_include",
Steven Moreland3544a932017-07-19 10:26:05 -070093 "include",
Steven Moreland3544a932017-07-19 10:26:05 -070094 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -070095 cflags: ["-Werror"],
Andreas Gamped299c072017-10-17 10:50:00 -070096 include_dirs: [
97 "libnativehelper/header_only_include",
98 "libnativehelper/platform_include",
99 ],
Colin Crosscf47d9b2016-07-27 10:35:53 -0700100 srcs: [
101 "JNIHelp.cpp",
102 "JniConstants.cpp",
103 "toStringArray.cpp",
104 ],
105 shared_libs: [
106 "liblog",
Colin Crosscf47d9b2016-07-27 10:35:53 -0700107 ],
108 sdk_version: "19",
109 stl: "c++_static",
110}
111
Dan Albert3cada472016-07-27 12:44:35 -0700112ndk_headers {
113 name: "ndk_jni.h",
Steven Morelandab365e32017-07-18 13:24:41 -0700114 from: "include_jni",
Dan Albert3cada472016-07-27 12:44:35 -0700115 to: "",
Steven Morelandab365e32017-07-18 13:24:41 -0700116 srcs: ["include_jni/jni.h"],
Dan Alberta725dc62016-10-20 10:17:46 -0700117 license: "NOTICE",
Dan Albert3cada472016-07-27 12:44:35 -0700118}
119
Colin Crosscf47d9b2016-07-27 10:35:53 -0700120//
121// Tests.
122//
123
124subdirs = ["tests"]