diff options
| author | Fenrir <[email protected]> | 2018-02-11 02:33:17 -0700 |
|---|---|---|
| committer | FenrirWolf <[email protected]> | 2018-02-11 03:10:13 -0700 |
| commit | 1dffa9cc165cb12b67370cb27387cf9ca502c6ea (patch) | |
| tree | 694be68a2e69fe7911df6941e399d99615d4dff3 /ctru-sys | |
| parent | We aren't linux (diff) | |
| download | archived-ctru-rs-1dffa9cc165cb12b67370cb27387cf9ca502c6ea.tar.xz archived-ctru-rs-1dffa9cc165cb12b67370cb27387cf9ca502c6ea.zip | |
Link libctru in ctru-sys
Allows debug builds to compile without throwing out random linker
errors. Plus it probably should have been this way the whole time
anyway.
Diffstat (limited to 'ctru-sys')
| -rw-r--r-- | ctru-sys/build.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ctru-sys/build.rs b/ctru-sys/build.rs new file mode 100644 index 0000000..cded1d0 --- /dev/null +++ b/ctru-sys/build.rs @@ -0,0 +1,11 @@ +use std::env; + +fn main() { + let dkp_path = env::var("DEVKITPRO").unwrap(); + + println!("cargo:rustc-link-search=native={}/libctru/lib", dkp_path); + println!("cargo:rustc-link-lib=static={}", match env::var("PROFILE").unwrap().as_str() { + "debug" => "ctrud", + _ => "ctru", + }); +} |