• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020-2021 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("//build/ohos.gni")
15
16config("hdf_osal_pub_config") {
17  visibility = [ ":*" ]
18
19  include_dirs = [
20    "//drivers/hdf_core/framework/include",
21    "//drivers/hdf_core/framework/include/osal",
22    "//drivers/hdf_core/framework/include/utils",
23    "//drivers/hdf_core/adapter/uhdf/posix/include",
24    "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
25    "//third_party/bounds_checking_function/include",
26  ]
27}
28if (defined(ohos_lite)) {
29  ohos_shared_library("hdf_posix_osal") {
30    output_extension = "z.so"
31    include_dirs = []
32
33    public_configs = [ ":hdf_osal_pub_config" ]
34
35    sources = [
36      "//drivers/hdf_core/framework/support/posix/src/osal_mem.c",
37      "//drivers/hdf_core/framework/support/posix/src/osal_mutex.c",
38      "//drivers/hdf_core/framework/support/posix/src/osal_sem.c",
39      "//drivers/hdf_core/framework/support/posix/src/osal_spinlock.c",
40      "//drivers/hdf_core/framework/support/posix/src/osal_thread.c",
41      "//drivers/hdf_core/framework/support/posix/src/osal_time.c",
42    ]
43
44    deps = [
45      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
46      "//third_party/bounds_checking_function:libsec_shared",
47    ]
48
49    defines = [ "__USER__" ]
50    ldflags = [ "-lpthread" ]
51
52    # install_images = [ "vendor" ]
53    subsystem_name = "hdf"
54    part_name = "hdf_core"
55  }
56} else {
57  group("hdf_posix_osal") {
58    deps = []
59  }
60}
61