# Copyright (c) 2021 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. if (defined(ohos_lite)) { group("libinit_module_engine") { } } else { import("//build/ohos.gni") import("//build/ohos/native_stub/native_stub.gni") # # exported include directories # config("init_module_engine_exported_config") { visibility = [ ":*" ] include_dirs = [ "include/", "//base/startup/init/services/include", "//base/startup/init/interfaces/innerkits/include", "//base/startup/init/services/log", "//third_party/cJSON", ] } # # innerkits for module development # ohos_native_stub_library("libinit_module_engine") { output_extension = "so" public_configs = [ ":init_module_engine_exported_config" ] stub_description_file = "./stub/libinit.stub.json" } # # For init linking, # export symbols defined in this json files only # ohos_native_stub_versionscript("libinit_stub_versionscript") { stub_description_file = "./stub/libinit.stub.json" } # # Generate empty library with symlink name to satisfy init loading required libraries # ohos_native_stub_library("libinit_stub_empty") { output_extension = "so" stub_description_file = "./stub/libinit.stub.empty.json" part_name = "init" subsystem_name = "startup" install_enable = true install_images = [ "system", "updater", "ramdisk", ] symlink_target_name = [ "libinit_module_engine.so" ] } config("init_module_engine_sources_config") { include_dirs = [ "//base/startup/init/interfaces/innerkits/init_module_engine/include", "//base/startup/init/interfaces/innerkits/include", "//base/startup/init/services/include", "//base/startup/init/services/log", "//third_party/cJSON", ] } ohos_source_set("init_module_engine_sources") { sources = [ "init_modulemgr.c" ] public_configs = [ ":init_module_engine_sources_config" ] } } # # init module engine all modules # group("modulegroup") { if (!defined(ohos_lite)) { deps = [ ":libinit_module_engine", ":libinit_stub_empty", ] } }