193360723Sopenharmony_ci# Copyright (c) 2020 Huawei Device Co., Ltd.
293360723Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
393360723Sopenharmony_ci# you may not use this file except in compliance with the License.
493360723Sopenharmony_ci# You may obtain a copy of the License at
593360723Sopenharmony_ci#
693360723Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
793360723Sopenharmony_ci#
893360723Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
993360723Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1093360723Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1193360723Sopenharmony_ci# See the License for the specific language governing permissions and
1293360723Sopenharmony_ci# limitations under the License.
1393360723Sopenharmony_ci
1493360723Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni")
1593360723Sopenharmony_ciimport("//build/lite/config/subsystem/aafwk/path.gni")
1693360723Sopenharmony_ci
1793360723Sopenharmony_ciif (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
1893360723Sopenharmony_ci  lite_library("dmslite") {
1993360723Sopenharmony_ci    target_type = "shared_library"
2093360723Sopenharmony_ci
2193360723Sopenharmony_ci    cflags = [ "-Wall" ]
2293360723Sopenharmony_ci    cflags_cc = cflags
2393360723Sopenharmony_ci
2493360723Sopenharmony_ci    defines = [
2593360723Sopenharmony_ci      "_GNU_SOURCE",
2693360723Sopenharmony_ci      "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
2793360723Sopenharmony_ci    ]
2893360723Sopenharmony_ci
2993360723Sopenharmony_ci    sources = [
3093360723Sopenharmony_ci      "source/dmslite.c",
3193360723Sopenharmony_ci      "source/dmslite_famgr.c",
3293360723Sopenharmony_ci      "source/dmslite_feature.c",
3393360723Sopenharmony_ci      "source/dmslite_msg_handler.c",
3493360723Sopenharmony_ci      "source/dmslite_packet.c",
3593360723Sopenharmony_ci      "source/dmslite_parser.c",
3693360723Sopenharmony_ci      "source/dmslite_permission.c",
3793360723Sopenharmony_ci      "source/dmslite_session.c",
3893360723Sopenharmony_ci      "source/dmslite_tlv_common.c",
3993360723Sopenharmony_ci    ]
4093360723Sopenharmony_ci
4193360723Sopenharmony_ci    include_dirs = [
4293360723Sopenharmony_ci      "include",
4393360723Sopenharmony_ci      "interfaces/innerkits",
4493360723Sopenharmony_ci      "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
4593360723Sopenharmony_ci      "${aafwk_lite_path}/interfaces/kits/ability_lite",
4693360723Sopenharmony_ci      "${aafwk_lite_path}/interfaces/kits/want_lite",
4793360723Sopenharmony_ci      "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
4893360723Sopenharmony_ci      "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite",
4993360723Sopenharmony_ci      "//commonlibrary/utils_lite/include",
5093360723Sopenharmony_ci      "//foundation/communication/dsoftbus/interfaces/kits/bus_center",
5193360723Sopenharmony_ci      "//foundation/communication/dsoftbus/interfaces/kits/common",
5293360723Sopenharmony_ci      "//foundation/communication/dsoftbus/interfaces/kits/transport",
5393360723Sopenharmony_ci      "//foundation/systemabilitymgr/samgr_lite/interfaces/innerkits",
5493360723Sopenharmony_ci      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
5593360723Sopenharmony_ci      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
5693360723Sopenharmony_ci      "//third_party/bounds_checking_function/include",
5793360723Sopenharmony_ci      "//third_party/cJSON",
5893360723Sopenharmony_ci    ]
5993360723Sopenharmony_ci
6093360723Sopenharmony_ci    deps = []
6193360723Sopenharmony_ci
6293360723Sopenharmony_ci    public_deps = [
6393360723Sopenharmony_ci      "${aafwk_lite_path}/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
6493360723Sopenharmony_ci      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
6593360723Sopenharmony_ci      "//foundation/communication/dsoftbus/sdk:softbus_client",
6693360723Sopenharmony_ci      "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
6793360723Sopenharmony_ci      "//third_party/bounds_checking_function:libsec_shared",
6893360723Sopenharmony_ci    ]
6993360723Sopenharmony_ci  }
7093360723Sopenharmony_ci
7193360723Sopenharmony_ci  lite_component("dtbschedmgr") {
7293360723Sopenharmony_ci    features = [ ":dmslite" ]
7393360723Sopenharmony_ci  }
7493360723Sopenharmony_ci
7593360723Sopenharmony_ci  generate_notice_file("dtbschedmgr_notice_file") {
7693360723Sopenharmony_ci    module_name = "dtbschedmgr"
7793360723Sopenharmony_ci    module_source_dir_list = [
7893360723Sopenharmony_ci      "//third_party/bounds_checking_function",
7993360723Sopenharmony_ci      "//third_party/cJSON",
8093360723Sopenharmony_ci    ]
8193360723Sopenharmony_ci  }
8293360723Sopenharmony_ci}
83