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(
15    "//foundation/bundlemanager/bundle_framework_lite/bundle_framework_lite.gni")
16
17generate_notice_file("bm_notice_file") {
18  module_name = "bm"
19  module_source_dir_list = [ "//third_party/cJSON" ]
20}
21
22executable("bm") {
23  sources = [
24    "src/command_parser.cpp",
25    "src/main.cpp",
26  ]
27
28  cflags = [
29    "-Wall",
30    "-Wno-format",
31  ]
32  cflags_cc = cflags
33
34  ldflags = [
35    "-lstdc++",
36    "-lpthread",
37    "-Wl,-Map=bm_tool.map",
38  ]
39
40  deps = [
41    "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
42    "${communication_path}/ipc/interfaces/innerkits/c/ipc:ipc_single",
43    "${hilog_lite_path}/frameworks/featured:hilog_shared",
44    "${permission_lite_path}/services/pms_client:pms_client",
45    "${samgr_lite_path}/samgr:samgr",
46    "${startup_path}/init/interfaces/innerkits:libbegetutil",
47    "//build/lite/config/component/cJSON:cjson_shared",
48  ]
49
50  include_dirs = [
51    "include",
52    "${permission_lite_path}/services/pms_client/include",
53    "${permission_lite_path}/interfaces/innerkits",
54    "${startup_path}/init/interfaces/innerkits/include/syspara",
55    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
56    "${aafwk_lite_path}/interfaces/kits/want_lite",
57    "${aafwk_lite_path}/services/abilitymgr_lite/include",
58    "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite/",
59    "${appexecfwk_lite_path}/frameworks/bundle_lite/include",
60    "${appexecfwk_lite_path}/utils/bundle_lite",
61    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
62    "${samgr_lite_path}/interfaces/kits/samgr",
63    "${samgr_lite_path}/interfaces/kits/registry",
64    "//third_party/cJSON",
65    "${utils_lite_path}/include",
66    "${communication_path}/ipc/interfaces/innerkits/c/ipc/include",
67  ]
68
69  defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
70  output_dir = "$root_out_dir/dev_tools"
71}
72