Mercurial
diff seobeo/BUILD @ 67:6626ec933933
[Seobeo] Separated out Client Server logic. Created test tools.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Wed, 24 Dec 2025 09:15:55 -0800 |
| parents | 08a465eec50b |
| children | 4532ce6d9eb8 |
line wrap: on
line diff
--- a/seobeo/BUILD Wed Dec 24 06:34:19 2025 -0800 +++ b/seobeo/BUILD Wed Dec 24 09:15:55 2025 -0800 @@ -1,5 +1,6 @@ load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_cc//cc:cc_test.bzl", "cc_test") filegroup( @@ -7,25 +8,78 @@ srcs = [ "seobeo.h", "seobeo_internal.h", + "snapshot_creator.h", ], visibility = ["//visibility:public"], ) +# Server-only target (no SSL, no OpenSSL dependency) alias( - name = "seobeo", + name = "seobeo_server", actual = select({ - "//config:macos": ":seobeo_macos", - "//config:linux": ":seobeo_linux", - "//conditions:default": ":seobeo_linux", + "//config:macos": ":seobeo_server_macos", + "//config:linux": ":seobeo_server_linux", + "//conditions:default": ":seobeo_server_linux", }), visibility = ["//visibility:public"], ) cc_library( - name = "seobeo_macos", + name = "seobeo_server_macos", + srcs = [ + "s_linux_network.c", + "s_web.c", + "s_ssl.c", + "os/s_macos_edge.c", + ], + hdrs = [":seobeo_hdrs"], + deps = [ + "//dowa:dowa", + ], + defines = ["SEOBEO_NO_SSL"], + target_compatible_with = [ + "@platforms//os:osx", + ], + visibility = ["//visibility:public"], +) + +cc_library( + name = "seobeo_server_linux", srcs = [ "s_linux_network.c", "s_web.c", + "s_ssl.c", + "os/s_linux_edge.c", + ], + hdrs = [":seobeo_hdrs"], + deps = [ + "//dowa:dowa", + ], + defines = ["SEOBEO_NO_SSL"], + target_compatible_with = [ + "@platforms//os:linux", + ], + visibility = ["//visibility:public"], +) + +# Client target with SSL support (full functionality) +alias( + name = "seobeo_client", + actual = select({ + "//config:macos": ":seobeo_client_macos", + "//config:linux": ":seobeo_client_linux", + "//conditions:default": ":seobeo_client_linux", + }), + visibility = ["//visibility:public"], +) + +cc_library( + name = "seobeo_client_macos", + srcs = [ + "s_linux_network.c", + "s_web.c", + "s_ssl.c", + "snapshot_creator.c", "os/s_macos_edge.c", ], hdrs = [":seobeo_hdrs"], @@ -40,10 +94,12 @@ ) cc_library( - name = "seobeo_linux", + name = "seobeo_client_linux", srcs = [ "s_linux_network.c", "s_web.c", + "s_ssl.c", + "snapshot_creator.c", "os/s_linux_edge.c", ], hdrs = [":seobeo_hdrs"], @@ -57,3 +113,19 @@ visibility = ["//visibility:public"], ) +# Default target for backward compatibility (points to client with SSL) +alias( + name = "seobeo", + actual = ":seobeo_client", + visibility = ["//visibility:public"], +) + +# Tests +cc_test( + name = "seobeo_http_client_test", + srcs = ["seobeo_http_client_test.c"], + deps = [":seobeo_client"], + size = "small", + timeout = "short", +) +