mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
74 lines
1.6 KiB
Python
74 lines
1.6 KiB
Python
load("//Config:buck_rule_macros.bzl", "static_library", "gen_header_targets")
|
|
|
|
ton_header_paths = [
|
|
"auto/tl/tonlib_api.h",
|
|
"tl/TlObject.h",
|
|
"tonlib/tonlib_client_json.h",
|
|
"tonlib/tonlibjson_export.h",
|
|
"tonlib/Client.h",
|
|
"td/utils/Slice-decl.h",
|
|
"td/utils/config.h",
|
|
"td/utils/SharedSlice.h",
|
|
"td/utils/Slice.h",
|
|
"td/utils/int_types.h",
|
|
"td/utils/common.h",
|
|
"td/utils/check.h",
|
|
"td/utils/unique_ptr.h",
|
|
"td/utils/port/platform.h",
|
|
]
|
|
|
|
ton_lib_names = [
|
|
"adnllite",
|
|
"crc32c",
|
|
"keys",
|
|
"lite-client-common",
|
|
"tdactor",
|
|
"tddb",
|
|
"tdnet",
|
|
"tdutils",
|
|
"tl-lite-utils",
|
|
"tl-utils",
|
|
"tl_api",
|
|
"tl_lite_api",
|
|
"tl_tonlib_api",
|
|
"ton_block",
|
|
"ton_crypto",
|
|
"tonlib",
|
|
]
|
|
|
|
ton_lib_flags = ["-l" + name for name in ton_lib_names]
|
|
|
|
genrule(
|
|
name = "ton_build",
|
|
srcs = [
|
|
"build-ton.sh",
|
|
"tonlib-src",
|
|
"iOS.cmake"
|
|
],
|
|
bash = "sh $SRCDIR/build-ton.sh $OUT $SRCDIR $(location //submodules/openssl:openssl_build_merged)",
|
|
out = "ton",
|
|
visibility = [
|
|
"//submodules/ton:...",
|
|
]
|
|
)
|
|
|
|
ton_header_targets = gen_header_targets(ton_header_paths, "ton_header_", "", "ton_build", "build/out/include")
|
|
|
|
apple_library(
|
|
name = "ton",
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
exported_headers = ton_header_targets,
|
|
linker_flags = [
|
|
"-L$(location :ton_build)/build/out/lib",
|
|
] + ton_lib_flags,
|
|
exported_linker_flags = [
|
|
"-L$(location :ton_build)/build/out/lib",
|
|
"-lcrypto",
|
|
] + ton_lib_flags,
|
|
deps = [
|
|
":ton_build"
|
|
],
|
|
)
|