-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.rs
38 lines (36 loc) · 1.13 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
38
//! Provides the directory locations as environment variables for the library.
//!
//! SPDX-FileCopyrightText: HighTec EDV-Systeme GmbH
//!
//! SPDX-License-Identifier: Apache-2.0
//!
use std::path::PathBuf;
fn main() {
let src = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
let px_root = src.join("tricore/v8.2.1.eval/kernel");
let px_root_incl = px_root.join("include");
let px_utils = src.join("tricore/v8.2.1.eval/utilities");
let px_utils_incl = px_utils.join("include");
let api_src = src.join("api-src");
println!(
"cargo:rustc-env=TRI_8_2_1_EVAL_KERNEL={}",
px_root.to_str().unwrap()
);
println!(
"cargo:rustc-env=TRI_8_2_1_EVAL_KERNEL_INCL={}",
px_root_incl.to_str().unwrap()
);
println!(
"cargo:rustc-env=TRI_8_2_1_EVAL_UTILS={}",
px_utils.to_str().unwrap()
);
println!(
"cargo:rustc-env=TRI_8_2_1_EVAL_UTILS_INCL={}",
px_utils_incl.to_str().unwrap()
);
println!(
"cargo:rustc-env=TRI_8_2_1_EVAL_API_SRC={}",
api_src.to_str().unwrap()
);
println!("cargo:rerun-if-changed=build.rs");
}