blob: d735d5255d5da82de4eb0f13587eef4f5f37e616 [file] [log] [blame]
Brian Silverman1d339f42018-03-11 15:58:00 -07001# It also restricts use to only with CTRE products and a roboRIO in FRC.
2licenses(["permissive"])
3
Brian Silverman1dd6c152019-01-20 17:17:40 -08004cc_library(
5 name = "libs",
6 srcs = [
7 "libraries/driver/lib/libCTRE_PhoenixCCI.a",
8 ],
9 restricted_to = ["//tools:roborio"],
10)
11
Parker Schuhd3b7a8872018-02-19 16:42:27 -080012# Excludes motor/sensor code because those have reliances on WPILib.
Brian Silverman1d339f42018-03-11 15:58:00 -070013cc_library(
14 name = "phoenix",
15 srcs = glob(
16 include = [
17 "cpp/src/**/*.cpp",
18 "libraries/driver/include/src/**/*.cpp",
19 ],
20 exclude = [
21 "**/Tasking/**",
22 "cpp/src/RCRadio3Ch.cpp",
23 "cpp/src/CompileTest.cpp",
Parker Schuhd3b7a8872018-02-19 16:42:27 -080024 "**/MotorControl/**",
25 "**/Sensors/**",
Brian Silverman1d339f42018-03-11 15:58:00 -070026 ],
Brian Silverman1dd6c152019-01-20 17:17:40 -080027 ),
Brian Silverman1d339f42018-03-11 15:58:00 -070028 hdrs = glob(
29 include = [
30 "cpp/include/**/*.h",
31 "libraries/driver/include/**/*.h",
32 ],
33 exclude = [
34 "**/Tasking/**",
Parker Schuhd3b7a8872018-02-19 16:42:27 -080035 "**/MotorControl/**",
36 "**/Sensors/**",
Brian Silverman1d339f42018-03-11 15:58:00 -070037 "cpp/include/ctre/phoenix/RCRadio3Ch.h",
38 ],
39 ),
40 includes = [
41 "cpp/include",
42 "libraries/driver/include",
43 ],
44 restricted_to = ["//tools:roborio"],
Brian Silverman37281fc2018-03-11 18:42:17 -070045 visibility = ["//visibility:public"],
Brian Silverman1d339f42018-03-11 15:58:00 -070046 deps = [
Brian Silverman1dd6c152019-01-20 17:17:40 -080047 ":libs",
Brian Silvermanb30b7f62019-01-20 15:04:41 -080048 "//third_party/allwpilib_2018:hal",
Brian Silverman1d339f42018-03-11 15:58:00 -070049 ],
50)