-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
37 lines (35 loc) · 1.46 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// build.rs
fn main() {
cxx_build::bridge("src/lib.rs")
.file("src/radio_tool.cc")
.file("radio_tool/src/ailunce_fw.cpp")
.file("radio_tool/src/ailunce_radio.cpp")
.file("radio_tool/src/cs_fw.cpp")
.file("radio_tool/src/dfu.cpp")
.file("radio_tool/src/fymodem.c")
.file("radio_tool/src/h8sx.cpp")
.file("radio_tool/src/hid.cpp")
.file("radio_tool/src/radio_factory.cpp")
.file("radio_tool/src/rdt.cpp")
.file("radio_tool/src/serial_radio_factory.cpp")
.file("radio_tool/src/tyt_dfu.cpp")
.file("radio_tool/src/tyt_fw.cpp")
.file("radio_tool/src/tyt_fw_sgl.cpp")
.file("radio_tool/src/tyt_hid.cpp")
.file("radio_tool/src/tyt_radio.cpp")
.file("radio_tool/src/tyt_sgl_radio.cpp")
.file("radio_tool/src/usb_radio_factory.cpp")
.file("radio_tool/src/yaesu_fw.cpp")
.file("radio_tool/src/yaesu_radio.cpp")
.file("radio_tool/src/ymodem_device.cpp")
.include("include")
.include("radio_tool/include")
.flag_if_supported("-std=c++17")
// NOTE: Disable radio_tool compile warnings, it is just a submodule here
.flag_if_supported("-w")
.compile("radio_factory");
println!("cargo:rerun-if-changed=src/main.rs");
println!("cargo:rerun-if-changed=src/radio_tool.cc");
println!("cargo:rerun-if-changed=include/radio_tool.h");
println!("cargo:rustc-link-lib=usb-1.0");
}