Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 1 | // 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 Park | 083b920 | 2017-07-14 15:56:33 +0900 | [diff] [blame] | 15 | cc_library_headers { |
| 16 | name: "jni_headers", |
| 17 | host_supported: true, |
| 18 | export_include_dirs: ["include_jni"], |
| 19 | vendor_available: true, |
Jerome Gaillard | f0d4205 | 2019-03-12 15:17:22 +0000 | [diff] [blame^] | 20 | target: { |
| 21 | windows: { |
| 22 | enabled: true, |
| 23 | }, |
| 24 | }, |
Jiyong Park | 083b920 | 2017-07-14 15:56:33 +0900 | [diff] [blame] | 25 | } |
| 26 | |
Andreas Gampe | 12afda4 | 2017-08-23 11:26:30 -0700 | [diff] [blame] | 27 | cc_library_headers { |
Andreas Gampe | d299c07 | 2017-10-17 10:50:00 -0700 | [diff] [blame] | 28 | name: "libnativehelper_header_only", |
| 29 | host_supported: true, |
| 30 | export_include_dirs: ["header_only_include"], |
Jerome Gaillard | f0d4205 | 2019-03-12 15:17:22 +0000 | [diff] [blame^] | 31 | target: { |
| 32 | windows: { |
| 33 | enabled: true, |
| 34 | }, |
| 35 | }, |
Andreas Gampe | d299c07 | 2017-10-17 10:50:00 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | cc_library_headers { |
Andreas Gampe | 12afda4 | 2017-08-23 11:26:30 -0700 | [diff] [blame] | 39 | name: "jni_platform_headers", |
| 40 | host_supported: true, |
| 41 | export_include_dirs: ["platform_include"], |
Jerome Gaillard | f0d4205 | 2019-03-12 15:17:22 +0000 | [diff] [blame^] | 42 | target: { |
| 43 | windows: { |
| 44 | enabled: true, |
| 45 | }, |
| 46 | }, |
Andreas Gampe | 12afda4 | 2017-08-23 11:26:30 -0700 | [diff] [blame] | 47 | } |
| 48 | |
Martin Stjernholm | 8f6839c | 2019-02-05 15:06:45 +0000 | [diff] [blame] | 49 | cc_library { |
| 50 | name: "libnativehelper", |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 51 | host_supported: true, |
| 52 | srcs: [ |
| 53 | "JNIHelp.cpp", |
| 54 | "JniConstants.cpp", |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 55 | "JniInvocation.cpp", |
Orion Hodson | aadb373 | 2018-11-21 12:58:34 +0000 | [diff] [blame] | 56 | "toStringArray.cpp", |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 57 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 58 | shared_libs: [ |
Jerome Gaillard | f0d4205 | 2019-03-12 15:17:22 +0000 | [diff] [blame^] | 59 | "libbase", |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 60 | "liblog", |
| 61 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 62 | cflags: [ |
| 63 | "-Werror", |
| 64 | "-fvisibility=protected", |
| 65 | ], |
Orion Hodson | b01e7fe | 2018-11-07 06:07:50 +0000 | [diff] [blame] | 66 | export_include_dirs: [ |
Martin Stjernholm | 8f6839c | 2019-02-05 15:06:45 +0000 | [diff] [blame] | 67 | "include", |
| 68 | "header_only_include", |
| 69 | "platform_include" |
Orion Hodson | b01e7fe | 2018-11-07 06:07:50 +0000 | [diff] [blame] | 70 | ], |
Martin Stjernholm | 8f6839c | 2019-02-05 15:06:45 +0000 | [diff] [blame] | 71 | stubs: { |
| 72 | symbol_file: "libnativehelper.map.txt", |
| 73 | versions: ["1"], |
| 74 | }, |
Jerome Gaillard | f0d4205 | 2019-03-12 15:17:22 +0000 | [diff] [blame^] | 75 | target: { |
| 76 | windows: { |
| 77 | enabled: true, |
| 78 | }, |
| 79 | }, |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | // |
| 83 | // NDK-only build for the target (device), using libc++. |
| 84 | // - Relies only on NDK exposed functionality. |
| 85 | // - This doesn't include JniInvocation. |
| 86 | // |
| 87 | |
| 88 | cc_library_shared { |
| 89 | name: "libnativehelper_compat_libc++", |
Steven Moreland | 3544a93 | 2017-07-19 10:26:05 -0700 | [diff] [blame] | 90 | export_include_dirs: [ |
Andreas Gampe | d299c07 | 2017-10-17 10:50:00 -0700 | [diff] [blame] | 91 | "header_only_include", |
Steven Moreland | 3544a93 | 2017-07-19 10:26:05 -0700 | [diff] [blame] | 92 | "include", |
Steven Moreland | 3544a93 | 2017-07-19 10:26:05 -0700 | [diff] [blame] | 93 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 94 | cflags: ["-Werror"], |
Andreas Gampe | d299c07 | 2017-10-17 10:50:00 -0700 | [diff] [blame] | 95 | include_dirs: [ |
| 96 | "libnativehelper/header_only_include", |
| 97 | "libnativehelper/platform_include", |
| 98 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 99 | srcs: [ |
| 100 | "JNIHelp.cpp", |
| 101 | "JniConstants.cpp", |
| 102 | "toStringArray.cpp", |
| 103 | ], |
| 104 | shared_libs: [ |
| 105 | "liblog", |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 106 | ], |
| 107 | sdk_version: "19", |
| 108 | stl: "c++_static", |
| 109 | } |
| 110 | |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 111 | ndk_headers { |
| 112 | name: "ndk_jni.h", |
Steven Moreland | ab365e3 | 2017-07-18 13:24:41 -0700 | [diff] [blame] | 113 | from: "include_jni", |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 114 | to: "", |
Steven Moreland | ab365e3 | 2017-07-18 13:24:41 -0700 | [diff] [blame] | 115 | srcs: ["include_jni/jni.h"], |
Dan Albert | a725dc6 | 2016-10-20 10:17:46 -0700 | [diff] [blame] | 116 | license: "NOTICE", |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 117 | } |
| 118 | |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 119 | // |
| 120 | // Tests. |
| 121 | // |
| 122 | |
| 123 | subdirs = ["tests"] |