File: build.rs

package info (click to toggle)
rust-md5-asm 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 128 kB
  • sloc: asm: 253; makefile: 14
file content (18 lines) | stat: -rw-r--r-- 458 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate cc;

use std::env;

fn main() {
    println!("dh-cargo:deb-built-using=md5=0={}", env::var("CARGO_MANIFEST_DIR").unwrap());
    let asm_path = if cfg!(target_arch = "x86") {
        "src/x86.S"
    } else if cfg!(target_arch = "x86_64") {
        "src/x64.S"
    } else {
        panic!("Unsupported target architecture");
    };
    cc::Build::new()
              .flag("-c")
              .file(asm_path)
              .compile("libmd5.a");
}