Home | History | Annotate | Download | only in binder
      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 
     15 cc_library_headers {
     16     name: "libbinder_headers",
     17     export_include_dirs: ["include"],
     18     vendor_available: true,
     19     header_libs: [
     20         "libbase_headers",
     21         "libcutils_headers",
     22         "libutils_headers",
     23     ],
     24     export_header_lib_headers: [
     25         "libbase_headers",
     26         "libcutils_headers",
     27         "libutils_headers",
     28     ],
     29 }
     30 
     31 cc_library_shared {
     32     name: "libbinder",
     33 
     34     // for vndbinder
     35     vendor_available: true,
     36     vndk: {
     37         enabled: true,
     38     },
     39     double_loadable: true,
     40 
     41     srcs: [
     42         "ActivityManager.cpp",
     43         "AppOpsManager.cpp",
     44         "Binder.cpp",
     45         "BpBinder.cpp",
     46         "BufferedTextOutput.cpp",
     47         "Debug.cpp",
     48         "IActivityManager.cpp",
     49         "IAppOpsCallback.cpp",
     50         "IAppOpsService.cpp",
     51         "IBatteryStats.cpp",
     52         "IInterface.cpp",
     53         "IMediaResourceMonitor.cpp",
     54         "IMemory.cpp",
     55         "IPCThreadState.cpp",
     56         "IPermissionController.cpp",
     57         "IProcessInfoService.cpp",
     58         "IResultReceiver.cpp",
     59         "IServiceManager.cpp",
     60         "IShellCallback.cpp",
     61         "IUidObserver.cpp",
     62         "MemoryBase.cpp",
     63         "MemoryDealer.cpp",
     64         "MemoryHeapBase.cpp",
     65         "Parcel.cpp",
     66         "ParcelFileDescriptor.cpp",
     67         "PermissionCache.cpp",
     68         "PermissionController.cpp",
     69         "PersistableBundle.cpp",
     70         "ProcessInfoService.cpp",
     71         "ProcessState.cpp",
     72         "Static.cpp",
     73         "Status.cpp",
     74         "TextOutput.cpp",
     75         "IpPrefix.cpp",
     76         "Value.cpp",
     77         ":libbinder_aidl",
     78     ],
     79 
     80     target: {
     81         vendor: {
     82             exclude_srcs: [
     83                 "ActivityManager.cpp",
     84                 "AppOpsManager.cpp",
     85                 "IActivityManager.cpp",
     86                 "IAppOpsCallback.cpp",
     87                 "IAppOpsService.cpp",
     88                 "IBatteryStats.cpp",
     89                 "IMediaResourceMonitor.cpp",
     90                 "IPermissionController.cpp",
     91                 "IProcessInfoService.cpp",
     92                 "IUidObserver.cpp",
     93                 "PermissionCache.cpp",
     94                 "PermissionController.cpp",
     95                 "ProcessInfoService.cpp",
     96                 "IpPrefix.cpp",
     97                 ":libbinder_aidl",
     98             ],
     99         },
    100     },
    101 
    102     aidl: {
    103         export_aidl_headers: true,
    104     },
    105 
    106     cflags: [
    107         "-Wall",
    108         "-Wextra",
    109         "-Werror",
    110         "-Wzero-as-null-pointer-constant",
    111     ],
    112     product_variables: {
    113         binder32bit: {
    114             cflags: ["-DBINDER_IPC_32BIT=1"],
    115         },
    116     },
    117 
    118     shared_libs: [
    119         "libbase",
    120         "liblog",
    121         "libcutils",
    122         "libutils",
    123         "libbinderthreadstate",
    124     ],
    125 
    126     header_libs: [
    127         "libbinder_headers",
    128     ],
    129 
    130     export_header_lib_headers: [
    131         "libbinder_headers",
    132     ],
    133 
    134     clang: true,
    135     sanitize: {
    136         misc_undefined: ["integer"],
    137     },
    138 }
    139 
    140 // AIDL interface between libbinder and framework.jar
    141 filegroup {
    142     name: "libbinder_aidl",
    143     srcs: [
    144         "aidl/android/content/pm/IPackageManagerNative.aidl",
    145     ],
    146 }
    147 
    148 subdirs = ["tests"]
    149