1# Copyright (C) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../../../config.gni") 16 17SUBSYSTEM_DIR = "../../.." 18IPC_CORE_ROOT = "$SUBSYSTEM_DIR/ipc/native" 19 20config("libipc_capi_private_config") { 21 cflags_cc = [ "-O2" ] 22} 23 24config("libipc_capi_public_config") { 25 include_dirs = [ "$SUBSYSTEM_DIR/interfaces/innerkits/c_api/include" ] 26} 27 28ohos_shared_library("ipc_capi") { 29 branch_protector_ret = "pac_ret" 30 include_dirs = [ 31 "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core/include", 32 "$SUBSYSTEM_DIR/interfaces/innerkits/c_api/include", 33 "$SUBSYSTEM_DIR/ipc/native/src/core/include", 34 "$IPC_CORE_ROOT/src/c_api/include", 35 "$SUBSYSTEM_DIR/utils/include", 36 ] 37 38 sources = [ 39 "$IPC_CORE_ROOT/src/c_api/source/ipc_cparcel.cpp", 40 "$IPC_CORE_ROOT/src/c_api/source/ipc_cremote_object.cpp", 41 "$IPC_CORE_ROOT/src/c_api/source/ipc_cskeleton.cpp", 42 "$IPC_CORE_ROOT/src/c_api/source/ipc_inner_object.cpp", 43 "$IPC_CORE_ROOT/src/c_api/source/ipc_internal_utils.cpp", 44 "$IPC_CORE_ROOT/src/c_api/source/ipc_remote_object_internal.cpp", 45 ] 46 47 configs = [ 48 "$SUBSYSTEM_DIR/config:ipc_util_config", 49 ":libipc_capi_private_config", 50 ] 51 52 public_configs = [ ":libipc_capi_public_config" ] 53 54 deps = [ 55 "$IPC_CORE_ROOT/src/core:ipc_common", 56 "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core", 57 ] 58 59 external_deps = [ 60 "c_utils:utils", 61 "hilog:libhilog", 62 ] 63 64 innerapi_tags = [ 65 "platformsdk", 66 "sasdk", 67 ] 68 69 symlink_target_name = [ "libipc_capi.so" ] 70 71 relative_install_dir = "./ndk/" 72 73 install_images = [ system_base_dir ] 74 75 subsystem_name = "communication" 76 part_name = "ipc" 77} 78