distributedschedule_samgr_lite/samgr/BUILD.gn

74 lines
2.1 KiB
Plaintext
Executable File

# 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("external_settings_shared") {
defines = [ "LAYER_INIT_SHARED_LIB" ]
}
config("samgr_public") {
include_dirs = [
"adapter",
"registry",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
"//utils/native/lite/include",
]
}
if (ohos_kernel_type == "liteos_m") {
static_library("samgr") {
sources = [
"registry/service_registry.c",
"source/samgr_lite.c",
]
public_configs = [ ":samgr_public" ]
cflags = [ "-Wall" ]
include_dirs =
[ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" ]
public_deps = [
"//foundation/distributedschedule/samgr_lite/samgr/adapter:samgr_adapter",
"//foundation/distributedschedule/samgr_lite/samgr/source:samgr_source",
]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
shared_library("samgr") {
sources = [ "source/samgr_lite.c" ]
cflags = [
"-fPIC",
"-Wall",
]
public_configs = [ ":samgr_public" ]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
"//third_party/cJSON",
]
public_deps = [
"//build/lite/config/component/cJSON:cjson_shared",
"//foundation/communication/ipc_lite:liteipc_adapter",
"//foundation/distributedschedule/samgr_lite/samgr/source:samgr_source",
"//foundation/distributedschedule/samgr_lite/samgr_client:client",
]
public_configs += [ ":external_settings_shared" ]
}
}