mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 18:49:35 +00:00
- Modular builders for `gcc`, `clang`, `msvc` - Platform-specific binary path generation (Linux/macOS/Windows) Changed: - Build configuration moved to `[build]` (`language`, `standard`, `compiler`) - `dcr.toml` formatting now includes the `[build]` section - Build uses built-in `debug/release` flags per compiler - Build compiles all `*.c/*.cpp` files in `src/` into a single binary (no incremental build) - Updated `dcr.toml` examples in documentation
26 lines
603 B
Rust
26 lines
603 B
Rust
#[cfg(target_os = "linux")]
|
|
pub mod linux;
|
|
#[cfg(target_os = "macos")]
|
|
pub mod macos;
|
|
#[cfg(target_os = "windows")]
|
|
pub mod windows;
|
|
|
|
pub fn bin_path(profile: &str, name: &str) -> String {
|
|
#[cfg(target_os = "linux")]
|
|
{
|
|
linux::bin_path(profile, name)
|
|
}
|
|
#[cfg(target_os = "macos")]
|
|
{
|
|
return macos::bin_path(profile, name);
|
|
}
|
|
#[cfg(target_os = "windows")]
|
|
{
|
|
return windows::bin_path(profile, name);
|
|
}
|
|
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
|
|
{
|
|
format!("./target/{profile}/{name}")
|
|
}
|
|
}
|