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, |
| 20 | } |
| 21 | |
Andreas Gampe | 12afda4 | 2017-08-23 11:26:30 -0700 | [diff] [blame] | 22 | cc_library_headers { |
| 23 | name: "jni_platform_headers", |
| 24 | host_supported: true, |
| 25 | export_include_dirs: ["platform_include"], |
| 26 | } |
| 27 | |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 28 | cc_library { |
| 29 | name: "libnativehelper", |
| 30 | host_supported: true, |
| 31 | srcs: [ |
| 32 | "JNIHelp.cpp", |
| 33 | "JniConstants.cpp", |
| 34 | "toStringArray.cpp", |
| 35 | "JniInvocation.cpp", |
| 36 | ], |
| 37 | |
| 38 | target: { |
Dan Willemsen | 7fe6895 | 2017-10-03 14:16:53 -0700 | [diff] [blame] | 39 | linux: { |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 40 | srcs: ["AsynchronousCloseMonitor.cpp"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 41 | }, |
Jiyong Park | 083b920 | 2017-07-14 15:56:33 +0900 | [diff] [blame] | 42 | }, |
| 43 | |
Logan Chien | 63e4917 | 2016-06-08 11:33:36 +0800 | [diff] [blame] | 44 | header_libs: ["jni_headers", "jni_platform_headers"], |
Jiyong Park | 083b920 | 2017-07-14 15:56:33 +0900 | [diff] [blame] | 45 | export_header_lib_headers: ["jni_headers"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 46 | |
| 47 | shared_libs: [ |
| 48 | "liblog", |
| 49 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 50 | cflags: [ |
| 51 | "-Werror", |
| 52 | "-fvisibility=protected", |
| 53 | ], |
Jiyong Park | 083b920 | 2017-07-14 15:56:33 +0900 | [diff] [blame] | 54 | |
Igor Murashkin | 31927e4 | 2017-02-17 15:50:15 -0800 | [diff] [blame] | 55 | export_include_dirs: ["include", "platform_include"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | // |
| 59 | // NDK-only build for the target (device), using libc++. |
| 60 | // - Relies only on NDK exposed functionality. |
| 61 | // - This doesn't include JniInvocation. |
| 62 | // |
| 63 | |
| 64 | cc_library_shared { |
| 65 | name: "libnativehelper_compat_libc++", |
Steven Moreland | 3544a93 | 2017-07-19 10:26:05 -0700 | [diff] [blame] | 66 | export_include_dirs: [ |
| 67 | "include", |
| 68 | "include/nativehelper", // TODO(b/63762847): remove |
| 69 | ], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 70 | cflags: ["-Werror"], |
Logan Chien | 63e4917 | 2016-06-08 11:33:36 +0800 | [diff] [blame] | 71 | include_dirs: ["libnativehelper/platform_include"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 72 | srcs: [ |
| 73 | "JNIHelp.cpp", |
| 74 | "JniConstants.cpp", |
| 75 | "toStringArray.cpp", |
| 76 | ], |
| 77 | shared_libs: [ |
| 78 | "liblog", |
| 79 | "libdl", |
| 80 | ], |
| 81 | sdk_version: "19", |
| 82 | stl: "c++_static", |
| 83 | } |
| 84 | |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 85 | ndk_headers { |
| 86 | name: "ndk_jni.h", |
Steven Moreland | ab365e3 | 2017-07-18 13:24:41 -0700 | [diff] [blame] | 87 | from: "include_jni", |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 88 | to: "", |
Steven Moreland | ab365e3 | 2017-07-18 13:24:41 -0700 | [diff] [blame] | 89 | srcs: ["include_jni/jni.h"], |
Dan Albert | a725dc6 | 2016-10-20 10:17:46 -0700 | [diff] [blame] | 90 | license: "NOTICE", |
Dan Albert | 3cada47 | 2016-07-27 12:44:35 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 93 | // |
| 94 | // Tests. |
| 95 | // |
| 96 | |
| 97 | subdirs = ["tests"] |