psx 0.1.4

Library for developing homebrew for the Sony PS1
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::PathBuf;
use std::{env, fs};

fn main() {
    const LINKER_SCRIPT: &'static str = "psexe.ld";
    println!("cargo:rerun-if-changed={}", LINKER_SCRIPT);
    let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
    println!("cargo:rustc-link-search={}", out.display());
    fs::write(
        out.join(LINKER_SCRIPT),
        include_str!("psexe.ld").to_string(),
    )
    .unwrap();
}