Do The Right Thing on linux/macos

This commit is contained in:
john newby 2019-08-15 13:22:27 +02:00
parent 9347bee344
commit dacccbae7d

View File

@ -1,8 +1,19 @@
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
artefact = libecrecover.so
endif
ifeq ($(UNAME), Darwin)
artefact = libecrecover.dylib
endif
all: priv/ecrecover.so
priv/ecrecover.so: src/lib.rs parity-ethereum/
cargo build --release
cp target/release/libecrecover.so priv/ecrecover.so
cp target/release/$(artefact) priv/ecrecover.so
clean:
rm -f src/ecrecover.so target/release/libecrecover.so