1# Copyright (C) 2024 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.
13
14import("//base/location/config.gni")
15import("//build/ohos.gni")
16
17config("lbs_base_module_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "$LOCATION_ROOT_DIR/interfaces/inner_api/native/include",
21    "$LOCATION_ROOT_DIR/interfaces/inner_api/include",
22  ]
23}
24
25ohos_shared_library("lbsbase_module") {
26  public_configs = [ ":lbs_base_module_config" ]
27
28  sources = [
29    "$LOCATION_ROOT_DIR/frameworks/base_module/source/location.cpp",
30    "$LOCATION_ROOT_DIR/frameworks/base_module/source/location_sa_load_manager.cpp",
31    "$LOCATION_ROOT_DIR/frameworks/base_module/source/request_config.cpp",
32    "$LOCATION_ROOT_DIR/frameworks/base_module/source/satellite_status.cpp",
33  ]
34
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40
41  branch_protector_ret = "pac_ret"
42
43  deps = []
44
45  external_deps = [
46    "c_utils:utils",
47    "hilog:libhilog",
48    "ipc:ipc_single",
49    "samgr:samgr_proxy",
50  ]
51
52  ldflags = [
53    "-Wl,--as-needed",
54    "-Wl,--gc-sections",
55  ]
56
57  cflags_cc = [
58    "-ffunction-sections",
59    "-fdata-sections",
60  ]
61
62  defines = []
63
64  part_name = "location"
65  subsystem_name = "location"
66}
67