Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 1 | load("//tools:platforms.bzl", "platforms") |
Brian Silverman | e8aa5be | 2020-11-06 15:51:37 -0800 | [diff] [blame] | 2 | load("//tools/build_rules:select.bzl", "cpu_select") |
Alex Perry | 0ea8161 | 2020-01-20 13:26:13 -0800 | [diff] [blame] | 3 | |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 4 | # Incompatible library in case one isn't available for a specific architecture. |
| 5 | cc_library( |
| 6 | name = "unavailable", |
| 7 | target_compatible_with = ["@platforms//:incompatible"], |
| 8 | ) |
| 9 | |
Austin Schuh | 2a70f4b | 2016-11-25 23:05:57 -0800 | [diff] [blame] | 10 | cc_library( |
Parker Schuh | d3b7a887 | 2018-02-19 16:42:27 -0800 | [diff] [blame] | 11 | name = "wpilib", |
| 12 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 13 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Parker Schuh | d3b7a887 | 2018-02-19 16:42:27 -0800 | [diff] [blame] | 14 | visibility = ["//visibility:public"], |
| 15 | deps = ["//frc971/wpilib/ahal"], |
| 16 | ) |
| 17 | |
| 18 | cc_library( |
| 19 | name = "wpilib_hal", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 20 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Parker Schuh | d3b7a887 | 2018-02-19 16:42:27 -0800 | [diff] [blame] | 21 | visibility = ["//visibility:public"], |
Brian Silverman | 7011c45 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 22 | deps = ["//third_party/allwpilib:hal"], |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 23 | ) |
| 24 | |
| 25 | cc_library( |
| 26 | name = "phoenix", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 27 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 28 | visibility = ["//visibility:public"], |
| 29 | deps = [ |
James Kuszmaul | 02eb05e | 2019-12-22 12:32:18 -0800 | [diff] [blame] | 30 | "@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 Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 36 | ], |
Austin Schuh | 2a70f4b | 2016-11-25 23:05:57 -0800 | [diff] [blame] | 37 | ) |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 38 | |
| 39 | cc_library( |
| 40 | name = "opencv", |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 41 | visibility = ["//visibility:public"], |
| 42 | deps = select({ |
| 43 | "//tools:cpu_k8": ["@opencv_k8//:opencv"], |
| 44 | "//tools:cpu_armhf": ["@opencv_armhf//:opencv"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 45 | "//conditions:default": [":unavailable"], |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 46 | }), |
| 47 | ) |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 48 | |
| 49 | cc_library( |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 50 | name = "gstreamer", |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 51 | visibility = ["//visibility:public"], |
| 52 | deps = select({ |
| 53 | "//tools:cpu_k8": ["@gstreamer_k8//:gstreamer"], |
| 54 | "//tools:cpu_armhf": ["@gstreamer_armhf//:gstreamer"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 55 | "//conditions:default": [":unavailable"], |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 56 | }), |
| 57 | ) |
| 58 | |
| 59 | cc_library( |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 60 | name = "halide", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 61 | visibility = ["//visibility:public"], |
| 62 | deps = select({ |
| 63 | "//tools:cpu_k8": ["@halide_k8//:halide"], |
| 64 | "//tools:cpu_armhf": ["@halide_armhf//:halide"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 65 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 66 | }), |
| 67 | ) |
| 68 | |
| 69 | cc_library( |
| 70 | name = "halide_gengen", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 71 | 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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 77 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 78 | }), |
| 79 | ) |
| 80 | |
| 81 | cc_library( |
| 82 | name = "halide_runtime", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 83 | 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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 89 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 90 | }), |
| 91 | ) |
Alex Perry | 0ea8161 | 2020-01-20 13:26:13 -0800 | [diff] [blame] | 92 | |
| 93 | cc_library( |
| 94 | name = "webrtc", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 95 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 0ea8161 | 2020-01-20 13:26:13 -0800 | [diff] [blame] | 96 | 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 Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 104 | |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 105 | cc_library( |
| 106 | name = "lzma", |
| 107 | visibility = ["//visibility:public"], |
| 108 | deps = select({ |
| 109 | "//tools:cpu_k8": ["@lzma_amd64//:lib"], |
Brian Silverman | e6a59ef | 2020-10-01 15:13:09 -0700 | [diff] [blame] | 110 | "//tools:cpu_aarch64": ["@lzma_arm64//:lib"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 111 | "//conditions:default": [":unavailable"], |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 112 | }), |
| 113 | ) |