diff --git a/Makefile b/Makefile index 7e3b2dd..82db7e5 100644 --- a/Makefile +++ b/Makefile @@ -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