Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 17 | // TODO(b/31559095): bionic on host should define this |
| 18 | cc_defaults { |
| 19 | name: "libbinder_ndk_host_user", |
| 20 | target: { |
| 21 | host: { |
| 22 | cflags: [ |
| 23 | "-D__INTRODUCED_IN(n)=", |
| 24 | "-D__assert(a,b,c)=", |
Elliott Hughes | 906e0bb | 2019-10-30 14:14:45 -0700 | [diff] [blame] | 25 | // We want all the APIs to be available on the host. |
| 26 | "-D__ANDROID_API__=10000", |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 27 | ], |
| 28 | }, |
| 29 | }, |
| 30 | } |
| 31 | |
Steven Moreland | a9fff71 | 2019-08-08 16:00:12 -0700 | [diff] [blame] | 32 | cc_library_shared { |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 33 | name: "libbinder_ndk", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 34 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 35 | defaults: ["libbinder_ndk_host_user"], |
| 36 | host_supported: true, |
| 37 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 38 | export_include_dirs: [ |
| 39 | "include_ndk", |
Steven Moreland | 6b7ea2a | 2019-08-08 16:19:21 -0700 | [diff] [blame] | 40 | "include_platform", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 41 | ], |
| 42 | |
Steven Moreland | b8cfad5 | 2019-01-09 13:07:00 -0800 | [diff] [blame] | 43 | cflags: [ |
| 44 | "-Wall", |
| 45 | "-Wextra", |
| 46 | "-Werror", |
| 47 | ], |
Steven Moreland | 763dc4c | 2018-12-12 11:30:06 -0800 | [diff] [blame] | 48 | |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 49 | srcs: [ |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 50 | "ibinder.cpp", |
Steven Moreland | 02f7565 | 2018-09-18 14:08:30 -0700 | [diff] [blame] | 51 | "ibinder_jni.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 52 | "parcel.cpp", |
Steven Moreland | 7c61558 | 2020-01-06 16:34:39 -0800 | [diff] [blame^] | 53 | "parcel_jni.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 54 | "process.cpp", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 55 | "stability.cpp", |
Steven Moreland | 5d62e44 | 2018-09-13 15:01:02 -0700 | [diff] [blame] | 56 | "status.cpp", |
Steven Moreland | 4d5ad49 | 2018-09-13 12:49:16 -0700 | [diff] [blame] | 57 | "service_manager.cpp", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 58 | ], |
| 59 | |
| 60 | shared_libs: [ |
Jooyung Han | 1f65e77 | 2019-03-07 16:55:04 +0900 | [diff] [blame] | 61 | "libandroid_runtime_lazy", |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 62 | "libbase", |
| 63 | "libbinder", |
| 64 | "libutils", |
| 65 | ], |
dimitry | b2cf95d | 2018-10-31 14:56:29 +0100 | [diff] [blame] | 66 | |
Steven Moreland | f01f744 | 2019-02-11 15:04:13 -0800 | [diff] [blame] | 67 | header_libs: [ |
| 68 | "jni_headers", |
| 69 | ], |
| 70 | export_header_lib_headers: [ |
| 71 | "jni_headers", |
| 72 | ], |
| 73 | |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 74 | target: { |
| 75 | linux: { |
| 76 | version_script: "libbinder_ndk.map.txt", |
| 77 | }, |
| 78 | }, |
Dongwon Kang | c45ac09 | 2018-12-11 21:59:02 +0000 | [diff] [blame] | 79 | stubs: { |
| 80 | symbol_file: "libbinder_ndk.map.txt", |
Steven Moreland | e8a434d | 2019-09-20 18:42:35 +0000 | [diff] [blame] | 81 | versions: [ |
| 82 | "29", |
| 83 | "30", |
| 84 | ], |
Dongwon Kang | c45ac09 | 2018-12-11 21:59:02 +0000 | [diff] [blame] | 85 | }, |
Steven Moreland | 2e87adc | 2018-08-20 19:47:00 -0700 | [diff] [blame] | 86 | } |
Steven Moreland | eb0e9cc | 2018-08-29 01:52:09 -0700 | [diff] [blame] | 87 | |
| 88 | ndk_headers { |
| 89 | name: "libbinder_ndk_headers", |
| 90 | from: "include_ndk/android", |
| 91 | to: "android", |
| 92 | srcs: [ |
| 93 | "include_ndk/android/*.h", |
| 94 | ], |
| 95 | license: "NOTICE", |
| 96 | } |
| 97 | |
| 98 | ndk_library { |
| 99 | name: "libbinder_ndk", |
| 100 | symbol_file: "libbinder_ndk.map.txt", |
| 101 | first_version: "29", |
| 102 | } |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 103 | |
| 104 | llndk_library { |
| 105 | name: "libbinder_ndk", |
| 106 | symbol_file: "libbinder_ndk.map.txt", |
| 107 | export_include_dirs: [ |
| 108 | "include_ndk", |
Steven Moreland | 6b7ea2a | 2019-08-08 16:19:21 -0700 | [diff] [blame] | 109 | "include_platform", |
Steven Moreland | f1ac0ac | 2019-07-22 17:46:38 -0700 | [diff] [blame] | 110 | ], |
| 111 | } |