# Copyright (c) 2020 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. config("samgr_adapter_public") { include_dirs = [ "./", "//commonlibrary/utils_lite/include", "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", ] } if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") { static_library("samgr_adapter") { sources = [ "cmsis/memory_adapter.c", "cmsis/queue_adapter.c", "cmsis/thread_adapter.c", "cmsis/time_adapter.c", ] public_configs = [ ":samgr_adapter_public" ] if (ohos_kernel_type == "liteos_m") { include_dirs = [ "//kernel/liteos_m/kal/", "//kernel/liteos_m/kal/cmsis", ] } } } if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { source_set("samgr_adapter") { sources = [ "posix/lock_free_queue.c", "posix/memory_adapter.c", "posix/queue_adapter.c", "posix/thread_adapter.c", "posix/time_adapter.c", ] public_configs = [ ":samgr_adapter_public" ] include_dirs = [ "//third_party/bounds_checking_function/include" ] cflags = [ "-fPIC", "-Wall", ] public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] defines = [ "_GNU_SOURCE" ] if (ohos_kernel_type == "linux") { defines += [ "SAMGR_LINUX_ADAPTER" ] } } }