blob: 4ecad0d848d0277c271ca8ff60d43a16265ddf8f [file] [log] [blame]
Philipp Schraderdada1072020-11-24 11:34:46 -08001load("//tools:platforms.bzl", "platforms")
Brian Silvermane8aa5be2020-11-06 15:51:37 -08002load("//tools/build_rules:select.bzl", "cpu_select")
Alex Perry0ea81612020-01-20 13:26:13 -08003
Philipp Schraderdada1072020-11-24 11:34:46 -08004# Incompatible library in case one isn't available for a specific architecture.
5cc_library(
6 name = "unavailable",
7 target_compatible_with = ["@platforms//:incompatible"],
8)
9
Austin Schuh2a70f4b2016-11-25 23:05:57 -080010cc_library(
Parker Schuhd3b7a8872018-02-19 16:42:27 -080011 name = "wpilib",
12 linkstatic = True,
Philipp Schraderdada1072020-11-24 11:34:46 -080013 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Parker Schuhd3b7a8872018-02-19 16:42:27 -080014 visibility = ["//visibility:public"],
15 deps = ["//frc971/wpilib/ahal"],
16)
17
18cc_library(
19 name = "wpilib_hal",
Philipp Schraderdada1072020-11-24 11:34:46 -080020 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Parker Schuhd3b7a8872018-02-19 16:42:27 -080021 visibility = ["//visibility:public"],
Brian Silverman7011c452020-01-05 13:18:21 -080022 deps = ["//third_party/allwpilib:hal"],
Austin Schuhf6b94632019-02-02 22:11:27 -080023)
24
25cc_library(
26 name = "phoenix",
Philipp Schraderdada1072020-11-24 11:34:46 -080027 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Austin Schuhf6b94632019-02-02 22:11:27 -080028 visibility = ["//visibility:public"],
29 deps = [
James Kuszmaul02eb05e2019-12-22 12:32:18 -080030 "@ctre_phoenix_api_cpp_athena//:api-cpp",
31 "@ctre_phoenix_api_cpp_headers//:api-cpp",
32 "@ctre_phoenix_cci_athena//:cci",
33 "@ctre_phoenix_cci_headers//:cci",
34 "@ctre_phoenix_diagnostics_athena//:diagnostics",
35 "@ctre_phoenix_diagnostics_headers//:diagnostics",
Austin Schuhf6b94632019-02-02 22:11:27 -080036 ],
Austin Schuh2a70f4b2016-11-25 23:05:57 -080037)
Brian Silvermand97a47c2020-01-16 00:47:53 -080038
39cc_library(
40 name = "opencv",
Brian Silvermand97a47c2020-01-16 00:47:53 -080041 visibility = ["//visibility:public"],
42 deps = select({
43 "//tools:cpu_k8": ["@opencv_k8//:opencv"],
44 "//tools:cpu_armhf": ["@opencv_armhf//:opencv"],
Philipp Schraderdada1072020-11-24 11:34:46 -080045 "//conditions:default": [":unavailable"],
Brian Silvermand97a47c2020-01-16 00:47:53 -080046 }),
47)
Brian Silverman764945b2020-01-16 23:40:43 -080048
49cc_library(
Tyler Chatow60671d32020-02-26 19:49:30 -080050 name = "gstreamer",
Tyler Chatow60671d32020-02-26 19:49:30 -080051 visibility = ["//visibility:public"],
52 deps = select({
53 "//tools:cpu_k8": ["@gstreamer_k8//:gstreamer"],
54 "//tools:cpu_armhf": ["@gstreamer_armhf//:gstreamer"],
Philipp Schraderdada1072020-11-24 11:34:46 -080055 "//conditions:default": [":unavailable"],
Tyler Chatow60671d32020-02-26 19:49:30 -080056 }),
57)
58
59cc_library(
Brian Silverman764945b2020-01-16 23:40:43 -080060 name = "halide",
Brian Silverman764945b2020-01-16 23:40:43 -080061 visibility = ["//visibility:public"],
62 deps = select({
63 "//tools:cpu_k8": ["@halide_k8//:halide"],
64 "//tools:cpu_armhf": ["@halide_armhf//:halide"],
Philipp Schraderdada1072020-11-24 11:34:46 -080065 "//conditions:default": [":unavailable"],
Brian Silverman764945b2020-01-16 23:40:43 -080066 }),
67)
68
69cc_library(
70 name = "halide_gengen",
Brian Silverman764945b2020-01-16 23:40:43 -080071 visibility = ["//visibility:public"],
72 # It's the same file in either version, but we'll pick the native version
73 # to minimize the chances of needing to download the other version unnecessarily.
74 deps = select({
75 "//tools:cpu_k8": ["@halide_k8//:gengen"],
76 "//tools:cpu_armhf": ["@halide_armhf//:gengen"],
Philipp Schraderdada1072020-11-24 11:34:46 -080077 "//conditions:default": [":unavailable"],
Brian Silverman764945b2020-01-16 23:40:43 -080078 }),
79)
80
81cc_library(
82 name = "halide_runtime",
Brian Silverman764945b2020-01-16 23:40:43 -080083 visibility = ["//visibility:public"],
84 # It's the same file in either version, but we'll pick the native version
85 # to minimize the chances of needing to download the other version unnecessarily.
86 deps = select({
87 "//tools:cpu_k8": ["@halide_k8//:runtime"],
88 "//tools:cpu_armhf": ["@halide_armhf//:runtime"],
Philipp Schraderdada1072020-11-24 11:34:46 -080089 "//conditions:default": [":unavailable"],
Brian Silverman764945b2020-01-16 23:40:43 -080090 }),
91)
Alex Perry0ea81612020-01-20 13:26:13 -080092
93cc_library(
94 name = "webrtc",
Philipp Schraderdada1072020-11-24 11:34:46 -080095 target_compatible_with = ["@platforms//os:linux"],
Alex Perry0ea81612020-01-20 13:26:13 -080096 visibility = ["//visibility:public"],
97 deps = cpu_select({
98 "amd64": ["@webrtc_x64//:webrtc"],
99 "armhf": ["@webrtc_arm//:webrtc"],
100 "cortex-m": ["@webrtc_arm//:webrtc"],
101 "roborio": ["@webrtc_rio//:webrtc"],
102 }),
103)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700104
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700105cc_library(
106 name = "lzma",
107 visibility = ["//visibility:public"],
108 deps = select({
109 "//tools:cpu_k8": ["@lzma_amd64//:lib"],
Brian Silvermane6a59ef2020-10-01 15:13:09 -0700110 "//tools:cpu_aarch64": ["@lzma_arm64//:lib"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800111 "//conditions:default": [":unavailable"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700112 }),
113)