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