1bc2ed2b3Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
2bc2ed2b3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3bc2ed2b3Sopenharmony_ci# you may not use this file except in compliance with the License.
4bc2ed2b3Sopenharmony_ci# You may obtain a copy of the License at
5bc2ed2b3Sopenharmony_ci#
6bc2ed2b3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
7bc2ed2b3Sopenharmony_ci#
8bc2ed2b3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9bc2ed2b3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10bc2ed2b3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11bc2ed2b3Sopenharmony_ci# See the License for the specific language governing permissions and
12bc2ed2b3Sopenharmony_ci# limitations under the License.
13bc2ed2b3Sopenharmony_ci
14bc2ed2b3Sopenharmony_ciimport("//build/ohos.gni")
15bc2ed2b3Sopenharmony_ciimport("//build/ohos_var.gni")
16bc2ed2b3Sopenharmony_ciimport("../../../../nfc.gni")
17bc2ed2b3Sopenharmony_ci
18bc2ed2b3Sopenharmony_ciohos_shared_library("cardemulation") {
19bc2ed2b3Sopenharmony_ci  sanitize = {
20bc2ed2b3Sopenharmony_ci    cfi = true
21bc2ed2b3Sopenharmony_ci    boundary_sanitize = true
22bc2ed2b3Sopenharmony_ci    integer_overflow = true
23bc2ed2b3Sopenharmony_ci    cfi_cross_dso = true
24bc2ed2b3Sopenharmony_ci    debug = false
25bc2ed2b3Sopenharmony_ci    ubsan = true
26bc2ed2b3Sopenharmony_ci  }
27bc2ed2b3Sopenharmony_ci  branch_protector_ret = "pac_ret"
28bc2ed2b3Sopenharmony_ci  defines = [ "DEBUG" ]
29bc2ed2b3Sopenharmony_ci  install_enable = true
30bc2ed2b3Sopenharmony_ci  include_dirs = [
31bc2ed2b3Sopenharmony_ci    "$NFC_DIR/interfaces/inner_api/cardEmulation",
32bc2ed2b3Sopenharmony_ci    "//base/notification/common_event_service/frameworks/core/include",
33bc2ed2b3Sopenharmony_ci    "$NFC_DIR/frameworks/js/napi/common",
34bc2ed2b3Sopenharmony_ci  ]
35bc2ed2b3Sopenharmony_ci
36bc2ed2b3Sopenharmony_ci  sources = [
37bc2ed2b3Sopenharmony_ci    "$NFC_DIR/frameworks/js/napi/common/nfc_napi_common_utils.cpp",
38bc2ed2b3Sopenharmony_ci    "nfc_napi_cardEmulation.cpp",
39bc2ed2b3Sopenharmony_ci    "nfc_napi_cardEmulation_adapter.cpp",
40bc2ed2b3Sopenharmony_ci    "nfc_napi_hce_adapter.cpp",
41bc2ed2b3Sopenharmony_ci  ]
42bc2ed2b3Sopenharmony_ci
43bc2ed2b3Sopenharmony_ci  deps = [
44bc2ed2b3Sopenharmony_ci    "$NFC_DIR/interfaces/inner_api/cardEmulation:nfc_inner_kits_card_emulation",
45bc2ed2b3Sopenharmony_ci    "$NFC_DIR/interfaces/inner_api/common:nfc_inner_kits_common",
46bc2ed2b3Sopenharmony_ci  ]
47bc2ed2b3Sopenharmony_ci
48bc2ed2b3Sopenharmony_ci  external_deps = [
49bc2ed2b3Sopenharmony_ci    "ability_base:want",
50bc2ed2b3Sopenharmony_ci    "bundle_framework:appexecfwk_base",
51bc2ed2b3Sopenharmony_ci    "c_utils:utils",
52bc2ed2b3Sopenharmony_ci    "hilog:libhilog",
53bc2ed2b3Sopenharmony_ci    "ipc:ipc_core",
54bc2ed2b3Sopenharmony_ci    "napi:ace_napi",
55bc2ed2b3Sopenharmony_ci  ]
56bc2ed2b3Sopenharmony_ci
57bc2ed2b3Sopenharmony_ci  relative_install_dir = "module/nfc"
58bc2ed2b3Sopenharmony_ci  part_name = "nfc"
59bc2ed2b3Sopenharmony_ci  subsystem_name = "communication"
60bc2ed2b3Sopenharmony_ci}
61