diff --git a/BUILD b/BUILD
index d7f0e5a58811ccc791e5848677f87ca892d98212..ff07cd11326451cb19a7823ac6bd7a8a58abca2e 100644
--- a/BUILD
+++ b/BUILD
@@ -853,3 +853,30 @@ cc_binary(
 
 
 
+
+objc_path = "src/objective-c"
+
+rx_library_path = objc_path + "/RxLibrary"
+
+objc_library(
+    name = "rx_library",
+    hdrs = glob([
+        rx_library_path + "/*.h",
+        rx_library_path + "/transformations/*.h",
+    ]),
+    srcs = glob([
+        rx_library_path + "/*.m",
+        rx_library_path + "/transformations/*.m",
+    ]),
+    includes = [objc_path],
+    deps = [
+        ":rx_library_private",
+    ],
+)
+
+objc_library(
+    name = "rx_library_private",
+    hdrs = glob([rx_library_path + "/private/*.h"]),
+    srcs = glob([rx_library_path + "/private/*.m"]),
+    visibility = ["//visibility:private"],
+)
diff --git a/templates/BUILD.template b/templates/BUILD.template
index ec5fb3584f00295e418679911b6a0b6d6ec2d782..63e9f9ebeb6f471e2107928f5baf081c93dbb9b8 100644
--- a/templates/BUILD.template
+++ b/templates/BUILD.template
@@ -112,3 +112,30 @@ cc_binary(
   ],
 )
 </%def>
+
+objc_path = "src/objective-c"
+
+rx_library_path = objc_path + "/RxLibrary"
+
+objc_library(
+    name = "rx_library",
+    hdrs = glob([
+        rx_library_path + "/*.h",
+        rx_library_path + "/transformations/*.h",
+    ]),
+    srcs = glob([
+        rx_library_path + "/*.m",
+        rx_library_path + "/transformations/*.m",
+    ]),
+    includes = [objc_path],
+    deps = [
+        ":rx_library_private",
+    ],
+)
+
+objc_library(
+    name = "rx_library_private",
+    hdrs = glob([rx_library_path + "/private/*.h"]),
+    srcs = glob([rx_library_path + "/private/*.m"]),
+    visibility = ["//visibility:private"],
+)