From dacccbae7d126c3d5990a9c03aafe0cc9649e2bc Mon Sep 17 00:00:00 2001 From: john newby Date: Thu, 15 Aug 2019 13:22:27 +0200 Subject: [PATCH] Do The Right Thing on linux/macos --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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