diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-03-15 05:07:20 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-03-15 05:07:20 +0800 |
commit | d085930d574264ae30c1091a9948c21b3160feb8 (patch) | |
tree | ce192c0cd0bcc7e3e9a8402a3147409392159277 /Makefile | |
parent | a148e716c06551b5ac143477c919548c9a682a03 (diff) | |
download | dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar.gz dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar.bz2 dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar.lz dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar.xz dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.tar.zst dexon-bls-d085930d574264ae30c1091a9948c21b3160feb8.zip |
add UNIT option to select bn256 or bn384
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -9,6 +9,14 @@ TEST_SRC=bls_test.cpp bls_if_test.cpp SAMPLE_SRC=bls_smpl.cpp bls_tool.cpp CFLAGS+=-I../mcl/include +ifeq ($(UNIT),4) + CFLAGS+=-DBLS_MAX_OP_UNIT_SIZE=4 + GO_TAG=bn256 +endif +ifeq ($(UNIT),6) + CFLAGS+=-DBLS_MAX_OP_UNIT_SIZE=6 + GO_TAG=bn384 +endif sample_test: $(EXE_DIR)/bls_smpl.exe python bls_smpl.py @@ -63,12 +71,10 @@ test: $(TEST_EXE) @grep -v "ng=0, exception=0" result.txt; if [ $$? -eq 1 ]; then echo "all unit tests succeed"; else exit 1; fi run_go: go/main.go $(BLS_LIB) $(BLS_IF_LIB) -# cd go && env GODEBUG=cgocheck=0 go run main.go - cd go && go run main.go + cd go && go run -tags $(GO_TAG) main.go clean: $(RM) $(BLS_LIB) $(OBJ_DIR)/* $(EXE_DIR)/*.exe $(GEN_EXE) $(ASM_SRC) $(ASM_OBJ) $(LIB_OBJ) $(LLVM_SRC) $(BLS_IF_LIB) - $(MAKE) -C ../mcl clean ALL_SRC=$(SRC_SRC) $(TEST_SRC) $(SAMPLE_SRC) DEPEND_FILE=$(addprefix $(OBJ_DIR)/, $(ALL_SRC:.cpp=.d)) |