• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2025 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/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//build/ohos/taihe_idl/taihe.gni")
17import("../../../../nfc.gni")
18
19copy_taihe_idl("copy_taihe_nfc_cardEmulation") {
20  sources = [ "idl/ohos.nfc.cardEmulation.nfcCardEmulation.taihe" ]
21}
22
23subsystem_name = "communication"
24part_name = "nfc"
25taihe_generated_file_path_nfcCardEmulation = "$taihe_file_path/out/$subsystem_name/$part_name/nfcCardEmulation"
26
27ohos_taihe("run_taihe") {
28  taihe_generated_file_path = "${taihe_generated_file_path_nfcCardEmulation}"
29  deps = [ ":copy_taihe_nfc_cardEmulation" ]
30  outputs = [
31    "$taihe_generated_file_path/src/ohos.nfc.cardEmulation.nfcCardEmulation.ani.cpp",
32    "$taihe_generated_file_path/src/ohos.nfc.cardEmulation.nfcCardEmulation.abi.c",
33  ]
34}
35
36taihe_shared_library("nfc_fwk_taihe_cardEmulation") {
37  sanitize = {
38    cfi = true
39    boundary_sanitize = true
40    integer_overflow = true
41    cfi_cross_dso = true
42    debug = false
43    ubsan = true
44  }
45  branch_protector_ret = "pac_ret"
46
47  taihe_generated_file_path = "${taihe_generated_file_path_nfcCardEmulation}"
48  sources = get_target_outputs(":run_taihe")
49
50  defines = [ "DEBUG" ]
51  include_dirs = [
52    "inc",
53    "$NFC_DIR/interfaces/inner_api/common",
54  ]
55  sources += [
56    "src/ani_constructor.cpp",
57    "src/impl/ohos.nfc.cardEmulation.nfcCardEmulation.impl.cpp"
58  ]
59
60  external_deps = [
61    "c_utils:utils",
62    "hilog:libhilog",
63    "ipc:ipc_core",
64    "samgr:samgr_proxy",
65  ]
66
67  deps = [
68    ":run_taihe",
69    "$NFC_DIR/interfaces/inner_api/common:nfc_inner_kits_common",
70    "$NFC_DIR/interfaces/inner_api/cardEmulation:nfc_inner_kits_card_emulation"
71  ]
72
73  part_name = "$part_name"
74  subsystem_name = "$subsystem_name"
75}
76
77generate_static_abc("nfc_fwk_etc_cardEmulation_abc") {
78  base_url = "${taihe_generated_file_path_nfcCardEmulation}"
79  files = [ "${taihe_generated_file_path_nfcCardEmulation}/@ohos.nfc.cardEmulation.ets" ]
80  is_boot_abc = "True"
81  device_dst_file = "/system/framework/nfc_fwk_etc_cardEmulation_abc.abc"
82  dependencies = [ ":run_taihe" ]
83}
84
85ohos_prebuilt_etc("nfc_fwk_etc_cardEmulation") {
86  source = "$target_out_dir/nfc_fwk_etc_cardEmulation_abc.abc"
87  deps = [ ":nfc_fwk_etc_cardEmulation_abc" ]
88  module_install_dir = "framework"
89  part_name = "$part_name"
90  subsystem_name = "$subsystem_name"
91}
92
93group("nfc_taihe_cardEmulation") {
94  deps = [
95    ":run_taihe",
96    ":nfc_fwk_etc_cardEmulation",
97    ":nfc_fwk_taihe_cardEmulation",
98  ]
99}