From cdd36de2bf408b71f1db5dd4771b3f6749d10c1b Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Wed, 26 Apr 2017 15:43:06 +0200
Subject: [PATCH] Build updates

---
 Makefile |  2 +-
 build.rs | 13 ++-----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index d54b73e..63ad3d0 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ $(OUT_DIR)libhash.a: $(OUT_DIR)libhash.a($(LIB_FILES:%=$(OUT_DIR)%.o)) Makefile
 $(OUT_DIR)libhash.a(%.o): $(OUT_DIR)%.o
 
 $(OUT_DIR)%.o: src/%.c Makefile
-	gcc -fPIC -Wall -Werror -c -o $@ $<
+	gcc -fPIC -Wall -Werror -O3 -c -o $@ $<
 
 $(OUT_DIR)md5sum.o: ./src/libhash.h
 $(OUT_DIR)sha512sum.o: ./src/libhash.h
diff --git a/build.rs b/build.rs
index 5be29a5..9c63429 100644
--- a/build.rs
+++ b/build.rs
@@ -1,23 +1,14 @@
 use std::process::Command;
 use std::env;
-use std::path::Path;
     
 fn main() {
     let out_dir = env::var("OUT_DIR").unwrap();
-
-/*
-extern crate gcc;
-   gcc::Config::new()
-        .file("src/md5sum.c")
-        .include("src")
-        .compile("libhashtoc.a");
-     */
     
-   let status = Command::new("make")
+    let status = Command::new("make")
         .arg(&format!("OUT_DIR={}/", out_dir))
         .arg("SHIPPING")
         .status().unwrap();
-    if (!status.success()) {
+    if !status.success() {
         panic!();
     }
     println!("cargo:rustc-link-search=native={}", out_dir);
-- 
GitLab