122 lines
3.5 KiB
Plaintext
122 lines
3.5 KiB
Plaintext
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
|
|
|
|
# C libraries
|
|
cc_library(
|
|
name = "CNIOAtomics",
|
|
srcs = glob(["Sources/CNIOAtomics/**/*.c", "Sources/CNIOAtomics/**/*.h"]),
|
|
hdrs = glob(["Sources/CNIOAtomics/include/**/*.h"]),
|
|
includes = ["Sources/CNIOAtomics/include"],
|
|
tags = ["swift_module=CNIOAtomics"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "CNIODarwin",
|
|
srcs = glob(["Sources/CNIODarwin/**/*.c", "Sources/CNIODarwin/**/*.h"]),
|
|
hdrs = glob(["Sources/CNIODarwin/include/**/*.h"]),
|
|
includes = ["Sources/CNIODarwin/include"],
|
|
defines = ["__APPLE_USE_RFC_3542"],
|
|
tags = ["swift_module=CNIODarwin"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "CNIOHTTPParser",
|
|
srcs = glob(["Sources/CNIOHTTPParser/**/*.c", "Sources/CNIOHTTPParser/**/*.h"]),
|
|
hdrs = glob(["Sources/CNIOHTTPParser/include/**/*.h"]),
|
|
includes = ["Sources/CNIOHTTPParser/include"],
|
|
tags = ["swift_module=CNIOHTTPParser"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "CNIOLinux",
|
|
srcs = glob(["Sources/CNIOLinux/**/*.c", "Sources/CNIOLinux/**/*.h"]),
|
|
hdrs = glob(["Sources/CNIOLinux/include/**/*.h"]),
|
|
includes = ["Sources/CNIOLinux/include"],
|
|
tags = ["swift_module=CNIOLinux"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "CNIOWindows",
|
|
srcs = glob(["Sources/CNIOWindows/**/*.c", "Sources/CNIOWindows/**/*.h"]),
|
|
hdrs = glob(["Sources/CNIOWindows/include/**/*.h"]),
|
|
includes = ["Sources/CNIOWindows/include"],
|
|
tags = ["swift_module=CNIOWindows"],
|
|
)
|
|
|
|
|
|
# Swift libraries
|
|
swift_library(
|
|
name = "NIOCore",
|
|
srcs = glob(["Sources/NIOCore/**/*.swift"]),
|
|
module_name = "NIOCore",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":NIOConcurrencyHelpers", ":CNIOLinux"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "_NIODataStructures",
|
|
srcs = glob(["Sources/_NIODataStructures/**/*.swift"]),
|
|
module_name = "_NIODataStructures",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOConcurrencyHelpers",
|
|
srcs = glob(["Sources/NIOConcurrencyHelpers/**/*.swift"]),
|
|
module_name = "NIOConcurrencyHelpers",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":CNIOAtomics"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOEmbedded",
|
|
srcs = glob(["Sources/NIOEmbedded/**/*.swift"]),
|
|
module_name = "NIOEmbedded",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":NIOCore", ":_NIODataStructures"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOFoundationCompat",
|
|
srcs = glob(["Sources/NIOFoundationCompat/**/*.swift"]),
|
|
module_name = "NIOFoundationCompat",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":NIO", ":NIOCore"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOHTTP1",
|
|
srcs = glob(["Sources/NIOHTTP1/**/*.swift"]),
|
|
module_name = "NIOHTTP1",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":NIO", ":NIOCore", ":CNIOHTTPParser", ":NIOConcurrencyHelpers"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOPosix",
|
|
srcs = glob(["Sources/NIOPosix/**/*.swift"]),
|
|
module_name = "NIOPosix",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":CNIOLinux", ":CNIODarwin", ":CNIOWindows", ":NIOConcurrencyHelpers", ":NIOCore", ":_NIODataStructures"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIOTLS",
|
|
srcs = glob(["Sources/NIOTLS/**/*.swift"]),
|
|
module_name = "NIOTLS",
|
|
visibility = ["//visibility:public"],
|
|
deps = [":NIO"],
|
|
)
|
|
|
|
swift_library(
|
|
name = "NIO",
|
|
srcs = glob(["Sources/NIO/**/*.swift"]),
|
|
module_name = "NIO",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":NIOCore",
|
|
":NIOEmbedded",
|
|
":NIOPosix",
|
|
],
|
|
)
|