1# Copyright (C) 2022 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 16LOCAL_DIR := $(GET_LOCAL_DIR) 17 18MODULE := $(LOCAL_DIR) 19 20LIBBINDER_DIR := frameworks/native/libs/binder 21LIBBASE_DIR := system/libbase 22LIBCUTILS_DIR := system/core/libcutils 23LIBUTILS_DIR := system/core/libutils 24FMTLIB_DIR := external/fmtlib 25 26MODULE_SRCS := \ 27 $(LOCAL_DIR)/../logging.cpp \ 28 $(LOCAL_DIR)/../TrustyStatus.cpp \ 29 $(LIBBINDER_DIR)/Binder.cpp \ 30 $(LIBBINDER_DIR)/BpBinder.cpp \ 31 $(LIBBINDER_DIR)/FdTrigger.cpp \ 32 $(LIBBINDER_DIR)/IInterface.cpp \ 33 $(LIBBINDER_DIR)/IResultReceiver.cpp \ 34 $(LIBBINDER_DIR)/Parcel.cpp \ 35 $(LIBBINDER_DIR)/Stability.cpp \ 36 $(LIBBINDER_DIR)/Status.cpp \ 37 $(LIBBINDER_DIR)/Utils.cpp \ 38 $(LIBBASE_DIR)/hex.cpp \ 39 $(LIBBASE_DIR)/stringprintf.cpp \ 40 $(LIBUTILS_DIR)/Errors.cpp \ 41 $(LIBUTILS_DIR)/misc.cpp \ 42 $(LIBUTILS_DIR)/RefBase.cpp \ 43 $(LIBUTILS_DIR)/StrongPointer.cpp \ 44 $(LIBUTILS_DIR)/Unicode.cpp \ 45 46# TODO: remove the following when libbinder supports std::string 47# instead of String16 and String8 for Status and descriptors 48MODULE_SRCS += \ 49 $(LIBUTILS_DIR)/SharedBuffer.cpp \ 50 $(LIBUTILS_DIR)/String16.cpp \ 51 $(LIBUTILS_DIR)/String8.cpp \ 52 53# TODO: disable dump() transactions to get rid of Vector 54MODULE_SRCS += \ 55 $(LIBUTILS_DIR)/VectorImpl.cpp \ 56 57MODULE_DEFINES += \ 58 LK_DEBUGLEVEL_NO_ALIASES=1 \ 59 60MODULE_INCLUDES += \ 61 $(LOCAL_DIR)/.. \ 62 63GLOBAL_INCLUDES += \ 64 $(LOCAL_DIR)/include \ 65 $(LOCAL_DIR)/../include \ 66 $(LIBBINDER_DIR)/include \ 67 $(LIBBINDER_DIR)/ndk/include_cpp \ 68 $(LIBBASE_DIR)/include \ 69 $(LIBCUTILS_DIR)/include \ 70 $(LIBUTILS_DIR)/include \ 71 $(FMTLIB_DIR)/include \ 72 73GLOBAL_COMPILEFLAGS += \ 74 -DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION \ 75 -DBINDER_NO_KERNEL_IPC \ 76 -DBINDER_RPC_SINGLE_THREADED \ 77 -D__ANDROID_VNDK__ \ 78 79MODULE_DEPS += \ 80 trusty/kernel/lib/libcxx-trusty \ 81 trusty/kernel/lib/libcxxabi-trusty \ 82 83include make/module.mk 84