aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-10-11 15:05:15 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-10-11 15:05:15 +0800
commit2e5146418cb7daddb4f5a9d649ba65f838c3679b (patch)
treec1c8df2bb153c69084897e2fb9f402ca9d02bc8c
parent0a364db2fdd28498ab7cb6872eb8a1513e2636cb (diff)
downloadtangerine-mcl-2e5146418cb7daddb4f5a9d649ba65f838c3679b.tar.gz
tangerine-mcl-2e5146418cb7daddb4f5a9d649ba65f838c3679b.tar.zst
tangerine-mcl-2e5146418cb7daddb4f5a9d649ba65f838c3679b.zip
rename USE_LLVM to MCL_USE_LLVM
-rw-r--r--Makefile9
-rw-r--r--readme.md2
-rw-r--r--sample/large.cpp2
3 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 55af2cd..baa6515 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,9 @@ ifeq ($(CPU),x86-64)
endif
SAMPLE_SRC=bench.cpp ecdh.cpp random.cpp rawbench.cpp vote.cpp pairing.cpp large.cpp
+ifneq ($(MCL_MAX_OP_BIT_SIZE),)
+ CFLAGS+=-DMCL_MAX_OP_BIT_SIZE=$(MCL_MAX_OP_BIT_SIZE)
+endif
##################################################################
MCL_LIB=$(LIB_DIR)/libmcl.a
all: $(MCL_LIB)
@@ -27,9 +30,9 @@ endif
ASM_OBJ=$(OBJ_DIR)/$(CPU).o
LIB_OBJ=$(OBJ_DIR)/fp.o
FUNC_LIST=src/func.list
-USE_LLVM?=0
-ifeq ($(USE_LLVM),1)
- CFLAGS+=-DMCL_USE_LLVM
+MCL_USE_LLVM?=0
+ifeq ($(MCL_USE_LLVM),1)
+ CFLAGS+=-DMCL_USE_LLVM=1
LIB_OBJ+=$(ASM_OBJ)
endif
LLVM_SRC=src/base$(BIT).ll
diff --git a/readme.md b/readme.md
index 1be6193..29e830e 100644
--- a/readme.md
+++ b/readme.md
@@ -47,7 +47,7 @@ msbuild /p:Configuration=Release
### Build with LLVM
require clang 3.8 or over.
```
-make USE_LLVM=1 LLVM_VER=-3.8
+make MCL_USE_LLVM=1 LLVM_VER=-3.8
```
# License
diff --git a/sample/large.cpp b/sample/large.cpp
index eb8d4e5..d7a627c 100644
--- a/sample/large.cpp
+++ b/sample/large.cpp
@@ -1,6 +1,6 @@
/*
large prime sample for 64-bit arch
- make USE_LLVM=1 CFLAGS_USER="-DMCL_MAX_OP_BIT_SIZE=768"
+ make MCL_USE_LLVM=1 MCL_MAX_OP_BIT_SIZE=768
*/
#include <mcl/fp.hpp>
#include <cybozu/benchmark.hpp>