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", |
Austin Schuh | f23a05a | 2022-02-24 18:11:23 -0800 | [diff] [blame] | 27 | linkopts = [ |
| 28 | "-Wl,-rpath", |
| 29 | "-Wl,.", |
| 30 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 31 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 32 | visibility = ["//visibility:public"], |
| 33 | deps = [ |
James Kuszmaul | 02eb05e | 2019-12-22 12:32:18 -0800 | [diff] [blame] | 34 | "@ctre_phoenix_api_cpp_athena//:api-cpp", |
| 35 | "@ctre_phoenix_api_cpp_headers//:api-cpp", |
| 36 | "@ctre_phoenix_cci_athena//:cci", |
| 37 | "@ctre_phoenix_cci_headers//:cci", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 38 | ], |
Austin Schuh | 2a70f4b | 2016-11-25 23:05:57 -0800 | [diff] [blame] | 39 | ) |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 40 | |
| 41 | cc_library( |
| 42 | name = "opencv", |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 43 | visibility = ["//visibility:public"], |
| 44 | deps = select({ |
| 45 | "//tools:cpu_k8": ["@opencv_k8//:opencv"], |
| 46 | "//tools:cpu_armhf": ["@opencv_armhf//:opencv"], |
Philipp Schrader | f1bbf34 | 2022-02-05 14:30:15 -0800 | [diff] [blame] | 47 | "//tools:cpu_arm64": ["@opencv_arm64//:opencv"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 48 | "//conditions:default": [":unavailable"], |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 49 | }), |
| 50 | ) |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 51 | |
| 52 | cc_library( |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 53 | name = "gstreamer", |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 54 | visibility = ["//visibility:public"], |
| 55 | deps = select({ |
| 56 | "//tools:cpu_k8": ["@gstreamer_k8//:gstreamer"], |
| 57 | "//tools:cpu_armhf": ["@gstreamer_armhf//:gstreamer"], |
Tyler Chatow | 6eda82c | 2022-03-27 22:37:38 -0700 | [diff] [blame^] | 58 | "//tools:cpu_arm64": ["@gstreamer_arm64//:gstreamer"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 59 | "//conditions:default": [":unavailable"], |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 60 | }), |
| 61 | ) |
| 62 | |
| 63 | cc_library( |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 64 | name = "halide", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 65 | visibility = ["//visibility:public"], |
| 66 | deps = select({ |
| 67 | "//tools:cpu_k8": ["@halide_k8//:halide"], |
| 68 | "//tools:cpu_armhf": ["@halide_armhf//:halide"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 69 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 70 | }), |
| 71 | ) |
| 72 | |
| 73 | cc_library( |
| 74 | name = "halide_gengen", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 75 | visibility = ["//visibility:public"], |
| 76 | # It's the same file in either version, but we'll pick the native version |
| 77 | # to minimize the chances of needing to download the other version unnecessarily. |
| 78 | deps = select({ |
| 79 | "//tools:cpu_k8": ["@halide_k8//:gengen"], |
| 80 | "//tools:cpu_armhf": ["@halide_armhf//:gengen"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 81 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 82 | }), |
| 83 | ) |
| 84 | |
| 85 | cc_library( |
| 86 | name = "halide_runtime", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 87 | visibility = ["//visibility:public"], |
| 88 | # It's the same file in either version, but we'll pick the native version |
| 89 | # to minimize the chances of needing to download the other version unnecessarily. |
| 90 | deps = select({ |
| 91 | "//tools:cpu_k8": ["@halide_k8//:runtime"], |
| 92 | "//tools:cpu_armhf": ["@halide_armhf//:runtime"], |
Philipp Schrader | f1bbf34 | 2022-02-05 14:30:15 -0800 | [diff] [blame] | 93 | "//tools:cpu_arm64": ["@halide_arm64//:runtime"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 94 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 95 | }), |
| 96 | ) |
Alex Perry | 0ea8161 | 2020-01-20 13:26:13 -0800 | [diff] [blame] | 97 | |
| 98 | cc_library( |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 99 | name = "lzma", |
| 100 | visibility = ["//visibility:public"], |
| 101 | deps = select({ |
| 102 | "//tools:cpu_k8": ["@lzma_amd64//:lib"], |
Philipp Schrader | f1bbf34 | 2022-02-05 14:30:15 -0800 | [diff] [blame] | 103 | "//tools:cpu_arm64": ["@lzma_arm64//:lib"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 104 | "//conditions:default": [":unavailable"], |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 105 | }), |
| 106 | ) |