1# Copyright (c) 2023 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") 15config("drm_capi_common_config") { 16 include_dirs = [ 17 "./common", 18 "./include", 19 "./../../../../interfaces/inner_api/native/drm", 20 "./../../../../services/utils/include", 21 ] 22 cflags = [ 23 "-fno-exceptions", 24 "-Wall", 25 "-fno-common", 26 "-fstack-protector-all", 27 "-Wshadow", 28 "-FPIC", 29 "-FS", 30 "-D_FORTIFY_SOURCE=2", 31 "-Wformat=2", 32 "-Wdate-time", 33 "-fdata-sections", 34 "-ffunction-sections", 35 "-fno-asynchronous-unwind-tables", 36 "-fno-unwind-tables", 37 "-Os", 38 ] 39 40 cflags_cc = [ 41 "-std=c++17", 42 "-fno-rtti", 43 ] 44} 45 46config("drm_capi_common_public_config") { 47 include_dirs = [ 48 "./common", 49 "./include", 50 "./../../../../interfaces/inner_api/native/drm", 51 "./../../../../services/utils/include", 52 ] 53} 54 55ohos_shared_library("native_drm") { 56 install_enable = true 57 58 public_configs = [ ":drm_capi_common_public_config" ] 59 configs = [ 60 ":drm_capi_common_config", 61 "./../../../../services/drm_service/idls:drm_sa_idl_config", 62 ] 63 64 sanitize = { 65 cfi = true 66 cfi_cross_dso = true 67 cfi_vcall_icall_only = true 68 debug = false 69 } 70 71 sources = [ 72 "./../../../../frameworks/c/drm_capi/native_err_convertor.cpp", 73 "./../../../../frameworks/c/drm_capi/native_mediakeysession.cpp", 74 "./../../../../frameworks/c/drm_capi/native_mediakeysystem.cpp", 75 "./../../../../services/utils/drm_api_operation.cpp", 76 ] 77 78 deps = [ "./../../../../frameworks/native:drm_framework" ] 79 80 external_deps = [ 81 "c_utils:utils", 82 "hiappevent:hiappevent_innerapi", 83 "hilog:libhilog", 84 "hisysevent:libhisysevent", 85 "hitrace:libhitracechain", 86 "ipc:ipc_core", 87 ] 88 innerapi_tags = [ "ndk" ] 89 output_extension = "so" 90 subsystem_name = "multimedia" 91 part_name = "drm_framework" 92} 93