Andrei Homescu | 74a5445 | 2021-12-10 05:30:21 +0000 | [diff] [blame] | 1 | # Copyright (C) 2021 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 | |
| 16 | LOCAL_DIR := $(GET_LOCAL_DIR) |
| 17 | |
| 18 | MODULE := $(LOCAL_DIR) |
| 19 | |
| 20 | LIBBINDER_DIR := frameworks/native/libs/binder |
| 21 | LIBBASE_DIR := system/libbase |
| 22 | LIBCUTILS_DIR := system/core/libcutils |
| 23 | LIBUTILS_DIR := system/core/libutils |
| 24 | FMTLIB_DIR := external/fmtlib |
| 25 | |
| 26 | MODULE_SRCS := \ |
| 27 | $(LOCAL_DIR)/logging.cpp \ |
| 28 | $(LOCAL_DIR)/OS.cpp \ |
| 29 | $(LOCAL_DIR)/RpcServerTrusty.cpp \ |
| 30 | $(LOCAL_DIR)/RpcTransportTipcTrusty.cpp \ |
| 31 | $(LOCAL_DIR)/TrustyStatus.cpp \ |
| 32 | $(LOCAL_DIR)/socket.cpp \ |
| 33 | $(LIBBINDER_DIR)/Binder.cpp \ |
| 34 | $(LIBBINDER_DIR)/BpBinder.cpp \ |
| 35 | $(LIBBINDER_DIR)/FdTrigger.cpp \ |
| 36 | $(LIBBINDER_DIR)/IInterface.cpp \ |
| 37 | $(LIBBINDER_DIR)/IResultReceiver.cpp \ |
| 38 | $(LIBBINDER_DIR)/Parcel.cpp \ |
Andrei Homescu | 24ad36e | 2022-08-04 01:33:33 +0000 | [diff] [blame] | 39 | $(LIBBINDER_DIR)/ParcelFileDescriptor.cpp \ |
Andrei Homescu | 74a5445 | 2021-12-10 05:30:21 +0000 | [diff] [blame] | 40 | $(LIBBINDER_DIR)/RpcServer.cpp \ |
| 41 | $(LIBBINDER_DIR)/RpcSession.cpp \ |
| 42 | $(LIBBINDER_DIR)/RpcState.cpp \ |
| 43 | $(LIBBINDER_DIR)/Stability.cpp \ |
| 44 | $(LIBBINDER_DIR)/Status.cpp \ |
| 45 | $(LIBBINDER_DIR)/Utils.cpp \ |
| 46 | $(LIBBASE_DIR)/hex.cpp \ |
| 47 | $(LIBBASE_DIR)/stringprintf.cpp \ |
| 48 | $(LIBUTILS_DIR)/Errors.cpp \ |
| 49 | $(LIBUTILS_DIR)/misc.cpp \ |
| 50 | $(LIBUTILS_DIR)/RefBase.cpp \ |
| 51 | $(LIBUTILS_DIR)/StrongPointer.cpp \ |
| 52 | $(LIBUTILS_DIR)/Unicode.cpp \ |
| 53 | |
| 54 | # TODO: remove the following when libbinder supports std::string |
| 55 | # instead of String16 and String8 for Status and descriptors |
| 56 | MODULE_SRCS += \ |
| 57 | $(LIBUTILS_DIR)/SharedBuffer.cpp \ |
| 58 | $(LIBUTILS_DIR)/String16.cpp \ |
| 59 | $(LIBUTILS_DIR)/String8.cpp \ |
| 60 | |
| 61 | # TODO: disable dump() transactions to get rid of Vector |
| 62 | MODULE_SRCS += \ |
| 63 | $(LIBUTILS_DIR)/VectorImpl.cpp \ |
| 64 | |
| 65 | MODULE_EXPORT_INCLUDES += \ |
| 66 | $(LOCAL_DIR)/include \ |
| 67 | $(LIBBINDER_DIR)/include \ |
| 68 | $(LIBBASE_DIR)/include \ |
| 69 | $(LIBCUTILS_DIR)/include \ |
| 70 | $(LIBUTILS_DIR)/include \ |
| 71 | $(FMTLIB_DIR)/include \ |
| 72 | |
Andrei Homescu | f786a85 | 2022-07-20 22:43:27 +0000 | [diff] [blame] | 73 | # The android/binder_to_string.h header is shared between libbinder and |
| 74 | # libbinder_ndk and included by auto-generated AIDL C++ files |
| 75 | MODULE_EXPORT_INCLUDES += \ |
| 76 | $(LIBBINDER_DIR)/ndk/include_cpp \ |
| 77 | |
Andrei Homescu | 74a5445 | 2021-12-10 05:30:21 +0000 | [diff] [blame] | 78 | MODULE_EXPORT_COMPILEFLAGS += \ |
Andrei Homescu | 74a5445 | 2021-12-10 05:30:21 +0000 | [diff] [blame] | 79 | -DBINDER_RPC_SINGLE_THREADED \ |
| 80 | -D__ANDROID_VNDK__ \ |
| 81 | |
Andrei Homescu | 9d8adb1 | 2022-08-02 04:38:30 +0000 | [diff] [blame^] | 82 | # libbinder has some deprecated declarations that we want to produce warnings |
| 83 | # not errors |
| 84 | MODULE_EXPORT_COMPILEFLAGS += \ |
| 85 | -Wno-error=deprecated-declarations \ |
| 86 | |
Andrei Homescu | 74a5445 | 2021-12-10 05:30:21 +0000 | [diff] [blame] | 87 | MODULE_LIBRARY_DEPS += \ |
| 88 | trusty/user/base/lib/libstdc++-trusty \ |
| 89 | trusty/user/base/lib/tipc \ |
| 90 | external/boringssl \ |
| 91 | |
| 92 | include make/library.mk |