# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") config("ability_config") { visibility = [ ":*" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } } ohos_shared_library("driver_extension") { include_dirs = [ "include" ] sources = [ "src/driver_extension.cpp", "src/driver_extension_context.cpp", "src/js_driver_extension.cpp", "src/js_driver_extension_context.cpp", ] external_deps = [ "ability_base:want", "ability_runtime:ability_connect_callback_stub", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:extensionkit_native", "ability_runtime:napi_common", "ability_runtime:runtime", "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "ipc:ipc_napi", "napi:ace_napi", ] cflags_cc = [ "-fno-asynchronous-unwind-tables", "-fno-unwind-tables", "-Os", ] subsystem_name = "hdf" part_name = "external_device_manager" } ohos_shared_library("driver_extension_module") { include_dirs = [ "include" ] sources = [ "src/driver_extension_module_loader.cpp" ] configs = [ ":ability_config" ] deps = [ ":driver_extension" ] external_deps = [ "ability_runtime:ability_manager", "ability_runtime:extensionkit_native", "napi:ace_napi", ] relative_install_dir = "extensionability/" subsystem_name = "hdf" part_name = "external_device_manager" }