1 Star 0 Fork 49

alexha/third_party_libcoap

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 2.23 KB
一键复制 编辑 原始数据 按行查看 历史
zh rui 提交于 2021-10-09 07:32 . update BUILD.gn.
# Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
cflags = [
"-Wall",
"-fPIC",
"-std=c99",
]
cflags_cc = cflags
ldflags = [ "-fPIC" ]
config("libcoap_config") {
include_dirs = [ "include/coap2" ]
defines = [ "_GNU_SOURCE" ]
}
source_set("libcoap_src") {
sources = [
"src/address.c",
"src/async.c",
"src/block.c",
"src/coap_debug.c",
"src/coap_event.c",
"src/coap_hashkey.c",
"src/coap_io.c",
"src/coap_notls.c",
"src/coap_openssl.c",
"src/coap_session.c",
"src/coap_time.c",
"src/encode.c",
"src/mem.c",
"src/net.c",
"src/option.c",
"src/pdu.c",
"src/resource.c",
"src/str.c",
"src/subscribe.c",
"src/uri.c",
]
configs += [ ":libcoap_config" ]
}
static_library("libcoap_static") {
deps = [ ":libcoap_src" ]
public_configs = [ ":libcoap_config" ]
}
shared_library("libcoap") {
deps = [ ":libcoap_src" ]
public_configs = [ ":libcoap_config" ]
}
} else {
import("//build/ohos.gni")
config("libcoap_config") {
include_dirs = [ "include/coap2" ]
}
ohos_source_set("libcoap_src") {
sources = [
"src/address.c",
"src/async.c",
"src/block.c",
"src/coap_debug.c",
"src/coap_event.c",
"src/coap_hashkey.c",
"src/coap_io.c",
"src/coap_notls.c",
"src/coap_openssl.c",
"src/coap_session.c",
"src/coap_time.c",
"src/encode.c",
"src/mem.c",
"src/net.c",
"src/option.c",
"src/pdu.c",
"src/resource.c",
"src/str.c",
"src/subscribe.c",
"src/uri.c",
]
configs = [ ":libcoap_config" ]
}
ohos_static_library("libcoap_static") {
deps = [ ":libcoap_src" ]
public_configs = [ ":libcoap_config" ]
}
ohos_shared_library("libcoap") {
deps = [ ":libcoap_src" ]
public_configs = [ ":libcoap_config" ]
subsystem_name = "communication"
if (defined(oem_commercial_build) && oem_commercial_build) {
part_name = "softbus"
} else {
defines = [ "STANDARD_SYSTEM_ENABLE" ]
part_name = "dsoftbus_standard"
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/alexha/third_party_libcoap.git
[email protected]:alexha/third_party_libcoap.git
alexha
third_party_libcoap
third_party_libcoap
master

搜索帮助