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 = [ |
Maxwell Henderson | fcc0d12 | 2023-08-05 17:03:34 -0700 | [diff] [blame] | 34 | "@ctre_phoenix6_tools_athena//:tools", |
| 35 | "@ctre_phoenix6_tools_headers//:tools", |
James Kuszmaul | 02eb05e | 2019-12-22 12:32:18 -0800 | [diff] [blame] | 36 | "@ctre_phoenix_api_cpp_athena//:api-cpp", |
| 37 | "@ctre_phoenix_api_cpp_headers//:api-cpp", |
| 38 | "@ctre_phoenix_cci_athena//:cci", |
| 39 | "@ctre_phoenix_cci_headers//:cci", |
James Kuszmaul | 9776b39 | 2023-01-14 14:08:08 -0800 | [diff] [blame] | 40 | ], |
| 41 | ) |
| 42 | |
| 43 | cc_library( |
Maxwell Henderson | fcc0d12 | 2023-08-05 17:03:34 -0700 | [diff] [blame] | 44 | name = "phoenix6", |
James Kuszmaul | 9776b39 | 2023-01-14 14:08:08 -0800 | [diff] [blame] | 45 | linkopts = [ |
| 46 | "-Wl,-rpath", |
| 47 | "-Wl,.", |
| 48 | ], |
| 49 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
| 50 | visibility = ["//visibility:public"], |
| 51 | deps = [ |
Maxwell Henderson | fcc0d12 | 2023-08-05 17:03:34 -0700 | [diff] [blame] | 52 | "@ctre_phoenix6_api_cpp_athena//:api-cpp", |
| 53 | "@ctre_phoenix6_api_cpp_headers//:api-cpp", |
| 54 | "@ctre_phoenix6_tools_athena//:tools", |
| 55 | "@ctre_phoenix6_tools_headers//:tools", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 56 | ], |
Austin Schuh | 2a70f4b | 2016-11-25 23:05:57 -0800 | [diff] [blame] | 57 | ) |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 58 | |
| 59 | cc_library( |
| 60 | name = "opencv", |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 61 | visibility = ["//visibility:public"], |
| 62 | deps = select({ |
| 63 | "//tools:cpu_k8": ["@opencv_k8//:opencv"], |
Austin Schuh | bffbe8b | 2023-11-22 21:32:05 -0800 | [diff] [blame^] | 64 | "//tools:cpu_arm64": ["@arm64_debian_sysroot//:opencv4"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 65 | "//conditions:default": [":unavailable"], |
Brian Silverman | d97a47c | 2020-01-16 00:47:53 -0800 | [diff] [blame] | 66 | }), |
| 67 | ) |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 68 | |
| 69 | cc_library( |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 70 | name = "gstreamer", |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 71 | visibility = ["//visibility:public"], |
| 72 | deps = select({ |
| 73 | "//tools:cpu_k8": ["@gstreamer_k8//:gstreamer"], |
Tyler Chatow | 6eda82c | 2022-03-27 22:37:38 -0700 | [diff] [blame] | 74 | "//tools:cpu_arm64": ["@gstreamer_arm64//:gstreamer"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 75 | "//conditions:default": [":unavailable"], |
Tyler Chatow | 60671d3 | 2020-02-26 19:49:30 -0800 | [diff] [blame] | 76 | }), |
| 77 | ) |
| 78 | |
| 79 | cc_library( |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 80 | name = "halide", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 81 | visibility = ["//visibility:public"], |
| 82 | deps = select({ |
| 83 | "//tools:cpu_k8": ["@halide_k8//:halide"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 84 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 85 | }), |
| 86 | ) |
| 87 | |
| 88 | cc_library( |
| 89 | name = "halide_gengen", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 90 | visibility = ["//visibility:public"], |
| 91 | # It's the same file in either version, but we'll pick the native version |
| 92 | # to minimize the chances of needing to download the other version unnecessarily. |
| 93 | deps = select({ |
| 94 | "//tools:cpu_k8": ["@halide_k8//:gengen"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 95 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 96 | }), |
| 97 | ) |
| 98 | |
| 99 | cc_library( |
| 100 | name = "halide_runtime", |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 101 | visibility = ["//visibility:public"], |
| 102 | # It's the same file in either version, but we'll pick the native version |
| 103 | # to minimize the chances of needing to download the other version unnecessarily. |
| 104 | deps = select({ |
| 105 | "//tools:cpu_k8": ["@halide_k8//:runtime"], |
Philipp Schrader | f1bbf34 | 2022-02-05 14:30:15 -0800 | [diff] [blame] | 106 | "//tools:cpu_arm64": ["@halide_arm64//:runtime"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 107 | "//conditions:default": [":unavailable"], |
Brian Silverman | 764945b | 2020-01-16 23:40:43 -0800 | [diff] [blame] | 108 | }), |
| 109 | ) |
Alex Perry | 0ea8161 | 2020-01-20 13:26:13 -0800 | [diff] [blame] | 110 | |
| 111 | cc_library( |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 112 | name = "lzma", |
| 113 | visibility = ["//visibility:public"], |
| 114 | deps = select({ |
| 115 | "//tools:cpu_k8": ["@lzma_amd64//:lib"], |
Philipp Schrader | f1bbf34 | 2022-02-05 14:30:15 -0800 | [diff] [blame] | 116 | "//tools:cpu_arm64": ["@lzma_arm64//:lib"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 117 | "//conditions:default": [":unavailable"], |
Brian Silverman | f59fe3f | 2020-09-22 21:04:09 -0700 | [diff] [blame] | 118 | }), |
| 119 | ) |
Austin Schuh | ae856ca | 2023-11-18 14:04:00 -0800 | [diff] [blame] | 120 | |
| 121 | cc_library( |
| 122 | name = "cudart", |
| 123 | visibility = ["//visibility:public"], |
| 124 | deps = select({ |
| 125 | "//tools:cpu_k8": ["@amd64_debian_sysroot//:cudart"], |
| 126 | "//tools:cpu_arm64": ["@arm64_debian_sysroot//:cudart"], |
| 127 | "//conditions:default": [":unavailable"], |
| 128 | }), |
| 129 | ) |
| 130 | |
| 131 | cc_library( |
| 132 | name = "nppi", |
| 133 | visibility = ["//visibility:public"], |
| 134 | deps = select({ |
| 135 | "//tools:cpu_k8": ["@amd64_debian_sysroot//:nppi"], |
| 136 | "//tools:cpu_arm64": ["@arm64_debian_sysroot//:nppi"], |
| 137 | "//conditions:default": [":unavailable"], |
| 138 | }), |
| 139 | ) |