aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-01-16 16:03:29 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-01-16 16:03:29 +0800
commit299fb3fcf91d159b01e356292c0a0d109522c503 (patch)
treee96cd38a457eeb7a919c56e1d699a239b941bd02
parenta70c681aeaac6f744a9ce337c46b933467c03eea (diff)
downloadtangerine-mcl-299fb3fcf91d159b01e356292c0a0d109522c503.tar.gz
tangerine-mcl-299fb3fcf91d159b01e356292c0a0d109522c503.tar.zst
tangerine-mcl-299fb3fcf91d159b01e356292c0a0d109522c503.zip
update make for macOS
-rw-r--r--common.mk5
-rw-r--r--readme.md8
2 files changed, 12 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 21ccd20..93ceef0 100644
--- a/common.mk
+++ b/common.mk
@@ -3,6 +3,9 @@ UNAME_S=$(shell uname -s)
ifeq ($(UNAME_S),Linux)
OS=Linux
endif
+ifeq ($(UNAME_S),Darwin)
+ ARCH=x86_64
+endif
ARCH?=$(shell arch)
ifeq ($(ARCH),x86_64)
CPU=x86-64
@@ -10,7 +13,7 @@ ifeq ($(ARCH),x86_64)
BIT=64
BIT_OPT=-m64
#LOW_ASM_SRC=src/asm/low_x86-64.asm
- ASM=nasm -felf64
+ #ASM=nasm -felf64
endif
ifeq ($(ARCH),x86)
CPU=x86
diff --git a/readme.md b/readme.md
index 7e49b18..73f8e55 100644
--- a/readme.md
+++ b/readme.md
@@ -68,6 +68,14 @@ open mcl.sln and build or if you have msbuild.exe
```
msbuild /p:Configuration=Release
```
+
+## Build for MacOS
+Install openssl and [llvm](http://releases.llvm.org/download.html) and add `<installed llvm dir>/bin/` to the path.
+```
+make UPDATE_ASM=1
+make -j test CFLAGS_USER=-I/usr/local/opt/openssl/include LDFLAGS_USER=-L/usr/local/opt/openssl/lib
+```
+
## Benchmark
A benchmark of a BN curve over the 254-bit prime p = 36z^4 + 36z^3 + 24z^2 + 6z + 1 where z = -(2^62 + 2^55 + 1).