1# Copyright (c) 2020 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.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/config/subsystem/aafwk/config.gni")
15import("//foundation/ability/ability_lite/ability_lite.gni")
16
17lite_component("tools_lite") {
18  features = [ ":aa" ]
19}
20
21generate_notice_file("tools_lite_notice_file") {
22  module_name = "tools_lite"
23  module_source_dir_list = [
24    "//third_party/bounds_checking_function",
25    "//third_party/cJSON",
26  ]
27}
28
29executable("aa") {
30  sources = [
31    "src/ability_tool.cpp",
32    "src/main.cpp",
33  ]
34
35  cflags = [ "-Wall" ]
36  cflags_cc = cflags
37
38  ldflags = [
39    "-lstdc++",
40    "-lpthread",
41    "-ldl",
42  ]
43
44  deps = [
45    "${aafwk_lite_path}/frameworks/abilitymgr_lite:aafwk_abilityManager_lite",
46    "${ability_lite_samgr_lite_path}/samgr:samgr",
47    "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
48    "${communication_path}/ipc/interfaces/innerkits/c/ipc:ipc_single",
49    "${hilog_lite_path}/frameworks/featured:hilog_shared",
50    "${kv_store_path}/interfaces/inner_api/kv_store:kv_store",
51    "//build/lite/config/component/cJSON:cjson_shared",
52  ]
53
54  if (enable_ohos_appexecfwk_feature_ability == true) {
55    deps += [
56      "${graphic_path}/../arkui/ui_lite:ui_lite",
57      "${graphic_path}/graphic_utils_lite:utils_lite",
58      "${graphic_path}/surface_lite",
59    ]
60  }
61  include_dirs = [
62    "include",
63    "${aafwk_lite_path}/interfaces/kits/ability_lite",
64    "${aafwk_lite_path}/interfaces/kits/want_lite",
65    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
66    "${aafwk_lite_path}/frameworks/abilitymgr_lite/include",
67    "${aafwk_lite_path}/frameworks/want_lite/include",
68    "${appexecfwk_lite_path}/utils/bundle_lite",
69    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
70    "${utils_lite_path}/include",
71    "${communication_path}/ipc/interfaces/innerkits/c/ipc/include",
72    "${ability_lite_samgr_lite_path}/interfaces/kits/registry",
73    "${ability_lite_samgr_lite_path}/interfaces/kits/samgr",
74    "//third_party/bounds_checking_function/include",
75    "//third_party/cJSON",
76  ]
77
78  defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
79  output_dir = "$root_out_dir/dev_tools"
80}
81