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.
13
14config("broadcast_public") {
15  include_dirs = [
16    "//commonlibrary/utils_lite/include",
17    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast",
18    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
19    "//foundation/systemabilitymgr/samgr_lite/samgr/adapter",
20  ]
21}
22
23if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") {
24  static_library("broadcast") {
25    sources = [
26      "source/broadcast_service.c",
27      "source/pub_sub_feature.c",
28      "source/pub_sub_implement.c",
29    ]
30    public_configs = [ ":broadcast_public" ]
31    include_dirs = []
32  }
33}
34
35if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
36  shared_library("broadcast") {
37    sources = [
38      "source/broadcast_service.c",
39      "source/pub_sub_feature.c",
40      "source/pub_sub_implement.c",
41    ]
42    public_configs = [ ":broadcast_public" ]
43    configs -= [ "//build/lite/config:language_c" ]
44    cflags_c = [
45      "-std=c11",
46      "-Wall",
47    ]
48    include_dirs = [ "//third_party/bounds_checking_function/include" ]
49    public_deps = [
50      "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
51      "//third_party/bounds_checking_function:libsec_shared",
52    ]
53  }
54}
55