1# Copyright (C) 2023 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) 17LIBBINDER_DIR := $(LOCAL_DIR)/../../.. 18LIBBINDER_NDK_BINDGEN_FLAG_FILE := \ 19 $(LIBBINDER_DIR)/rust/libbinder_ndk_bindgen_flags.txt 20 21MODULE := $(LOCAL_DIR) 22 23MODULE_SRCS := $(LIBBINDER_DIR)/rust/sys/lib.rs 24 25MODULE_CRATE_NAME := binder_ndk_sys 26 27MODULE_LIBRARY_DEPS += \ 28 $(LIBBINDER_DIR)/trusty \ 29 $(LIBBINDER_DIR)/trusty/ndk \ 30 trusty/user/base/lib/trusty-sys \ 31 32MODULE_RUSTFLAGS += \ 33 --cfg 'android_vendor' \ 34 --cfg 'trusty' \ 35 36MODULE_BINDGEN_SRC_HEADER := $(LIBBINDER_DIR)/rust/sys/BinderBindings.hpp 37 38# Add the flags from the flag file 39MODULE_BINDGEN_FLAGS += $(shell cat $(LIBBINDER_NDK_BINDGEN_FLAG_FILE)) 40MODULE_SRCDEPS += $(LIBBINDER_NDK_BINDGEN_FLAG_FILE) 41 42include make/library.mk 43