diff --git a/.gitignore b/.gitignore index ecfc5572..d67afc9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ *.sw[po] -libcrypto*.dylib -libcrypto*.so +*.dylib +*.so *.dSYM/ -crypto +/.rust +/bin/ +/build/ +/lib/ +/src/crypto/lib diff --git a/.travis.yml b/.travis.yml index ed4eeddf..1ba08680 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,4 @@ before_install: install: - sudo apt-get install rust-nightly script: - - make all - - ./crypto + - make all test diff --git a/Makefile b/Makefile index 9719e55c..5e385052 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,13 @@ +RUSTPKG ?= rustpkg +RUSTC ?= rustc +RUST_FLAGS ?= -Z debug-info -O -crypto: $(wildcard *.rs) - rustc crypto.rs - rustc --test crypto.rs +all: + $(RUSTPKG) $(RUST_FLAGS) install crypto + +test: + $(RUSTC) $(RUST_FLAGS) --test src/crypto/lib.rs + ./src/crypto/lib clean: - rm -f crypto libcrypto-*.so - rm -f libcrypto-*.dylib - rm -rf *.dSYM + rm -rf bin/ lib/ build/ src/crypto/lib diff --git a/hash.rs b/src/crypto/hash.rs similarity index 100% rename from hash.rs rename to src/crypto/hash.rs diff --git a/hex.rs b/src/crypto/hex.rs similarity index 100% rename from hex.rs rename to src/crypto/hex.rs diff --git a/hmac.rs b/src/crypto/hmac.rs similarity index 100% rename from hmac.rs rename to src/crypto/hmac.rs diff --git a/crypto.rs b/src/crypto/lib.rs similarity index 100% rename from crypto.rs rename to src/crypto/lib.rs diff --git a/pkcs5.rs b/src/crypto/pkcs5.rs similarity index 100% rename from pkcs5.rs rename to src/crypto/pkcs5.rs diff --git a/pkey.rs b/src/crypto/pkey.rs similarity index 100% rename from pkey.rs rename to src/crypto/pkey.rs diff --git a/rand.rs b/src/crypto/rand.rs similarity index 100% rename from rand.rs rename to src/crypto/rand.rs diff --git a/symm.rs b/src/crypto/symm.rs similarity index 100% rename from symm.rs rename to src/crypto/symm.rs