17777dab0Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
27777dab0Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
37777dab0Sopenharmony_ci# you may not use this file except in compliance with the License.
47777dab0Sopenharmony_ci# You may obtain a copy of the License at
57777dab0Sopenharmony_ci#
67777dab0Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
77777dab0Sopenharmony_ci#
87777dab0Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
97777dab0Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
107777dab0Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
117777dab0Sopenharmony_ci# See the License for the specific language governing permissions and
127777dab0Sopenharmony_ci# limitations under the License.
137777dab0Sopenharmony_ci
147777dab0Sopenharmony_ciimport("//build/ohos.gni")
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ciohos_ndk_library("libteec") {
177777dab0Sopenharmony_ci  output_name = "teec"
187777dab0Sopenharmony_ci  output_extension = "so"
197777dab0Sopenharmony_ci  ndk_description_file = "./libteec.ndk.json"
207777dab0Sopenharmony_ci  min_compact_version = "12"
217777dab0Sopenharmony_ci  system_capability = "SystemCapability.Tee.TeeClient"
227777dab0Sopenharmony_ci  system_capability_headers = [
237777dab0Sopenharmony_ci    "./include/tee_client_api.h",
247777dab0Sopenharmony_ci    "./include/tee_client_constants.h",
257777dab0Sopenharmony_ci    "./include/tee_client_type.h",
267777dab0Sopenharmony_ci  ]
277777dab0Sopenharmony_ci}
287777dab0Sopenharmony_ci
297777dab0Sopenharmony_ciohos_ndk_headers("libtee_header") {
307777dab0Sopenharmony_ci  dest_dir = "$ndk_headers_out_dir/tee"
317777dab0Sopenharmony_ci  sources = [
327777dab0Sopenharmony_ci    "./include/oemkey.h",
337777dab0Sopenharmony_ci    "./include/rpmb_driver_rw_api.h",
347777dab0Sopenharmony_ci    "./include/rpmb_fcntl.h",
357777dab0Sopenharmony_ci    "./include/tee_arith_api.h",
367777dab0Sopenharmony_ci    "./include/tee_core_api.h",
377777dab0Sopenharmony_ci    "./include/tee_crypto_api.h",
387777dab0Sopenharmony_ci    "./include/tee_crypto_hal.h",
397777dab0Sopenharmony_ci    "./include/tee_defines.h",
407777dab0Sopenharmony_ci    "./include/tee_drv_client.h",
417777dab0Sopenharmony_ci    "./include/tee_dynamic_srv.h",
427777dab0Sopenharmony_ci    "./include/tee_ext_api.h",
437777dab0Sopenharmony_ci    "./include/tee_hw_ext_api.h",
447777dab0Sopenharmony_ci    "./include/tee_hw_ext_api_legacy.h",
457777dab0Sopenharmony_ci    "./include/tee_internal_se_api.h",
467777dab0Sopenharmony_ci    "./include/tee_log.h",
477777dab0Sopenharmony_ci    "./include/tee_mem_mgmt_api.h",
487777dab0Sopenharmony_ci    "./include/tee_mem_monitoring_api.h",
497777dab0Sopenharmony_ci    "./include/tee_object_api.h",
507777dab0Sopenharmony_ci    "./include/tee_property_api.h",
517777dab0Sopenharmony_ci    "./include/tee_rtc_time_api.h",
527777dab0Sopenharmony_ci    "./include/tee_service_public.h",
537777dab0Sopenharmony_ci    "./include/tee_sharemem_ops.h",
547777dab0Sopenharmony_ci    "./include/tee_time_api.h",
557777dab0Sopenharmony_ci    "./include/tee_trusted_storage_api.h",
567777dab0Sopenharmony_ci    "./include/tee_tui_gp_api.h",
577777dab0Sopenharmony_ci  ]
587777dab0Sopenharmony_ci}
597777dab0Sopenharmony_ci
607777dab0Sopenharmony_ciohos_ndk_headers("libteec_header") {
617777dab0Sopenharmony_ci  dest_dir = "$ndk_headers_out_dir/tee_client"
627777dab0Sopenharmony_ci  sources = [
637777dab0Sopenharmony_ci    "./include/tee_client_api.h",
647777dab0Sopenharmony_ci    "./include/tee_client_constants.h",
657777dab0Sopenharmony_ci    "./include/tee_client_type.h",
667777dab0Sopenharmony_ci  ]
677777dab0Sopenharmony_ci}
687777dab0Sopenharmony_ci
697777dab0Sopenharmony_cigroup("tee_ndk_header") {
707777dab0Sopenharmony_ci  deps = [
717777dab0Sopenharmony_ci    ":libtee_header",
727777dab0Sopenharmony_ci    ":libteec_header",
737777dab0Sopenharmony_ci  ]
747777dab0Sopenharmony_ci}
75