diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | go/bls/bls.go | 2 | ||||
-rw-r--r-- | mklib.bat | 12 | ||||
-rwxr-xr-x | setvar.bat | 8 |
4 files changed, 12 insertions, 13 deletions
@@ -47,7 +47,6 @@ $(BLS384_LIB): $(LIB_OBJ) $(OBJ_DIR)/bls_c384.o $(AR) $@ $(LIB_OBJ) $(OBJ_DIR)/bls_c384.o $(BLS384_SLIB): $(OBJ_DIR)/bls_c384.o $(MCL_LIB) -# $(PRE)$(CXX) -shared -o $@ -Wl,--whole-archive $(BLS384_LIB) $(BN384_LIB) $(MCL_LIB) -Wl,--no-whole-archive $(PRE)$(CXX) -shared -o $@ $(OBJ_DIR)/bls_c384.o $(MCL_LIB) VPATH=test sample src @@ -73,7 +72,7 @@ test: $(TEST_EXE) @grep -v "ng=0, exception=0" result.txt; if [ $$? -eq 1 ]; then echo "all unit tests succeed"; else exit 1; fi test_go: go/bls/bls.go go/bls/bls_test.go $(BLS384_SLIB) - cd go/bls && env CGO_CFLAGS="-I../../include -I../../../mcl/include" CGO_LDFLAGS="-L../../lib -L../../../mcl/lib" LD_LIBRARY_PAHT=../../lib go test . + cd go/bls && env CGO_CFLAGS="-I../../include -I../../../mcl/include" CGO_LDFLAGS="-L../../lib -L../../../mcl/lib" LD_LIBRARY_PATH=../../lib go test . # cd go/bls && go test -tags $(GO_TAG) -v . clean: diff --git a/go/bls/bls.go b/go/bls/bls.go index 8495770..91da636 100644 --- a/go/bls/bls.go +++ b/go/bls/bls.go @@ -2,7 +2,7 @@ package bls /* #cgo CFLAGS:-DMCLBN_FP_UNIT_SIZE=6 -#cgo LDFLAGS:-lbls384 -lmcl -lgmpxx -lstdc++ -lgmp -lcrypto +#cgo LDFLAGS:-lbls384_dy -lgmpxx -lstdc++ -lgmp -lcrypto #include <bls/bls.h> */ import "C" @@ -1,10 +1,10 @@ @echo off call setvar.bat echo make bls.lib -cl /c %CFLAGS% src\bls.cpp -lib /OUT:lib\bls.lib /nodefaultlib bls.obj %LDFLAGS% -rem echo make lib_if.lib -cl /c %CFLAGS% src\bls_if.cpp -rem lib /OUT:lib\bls_if.lib /nodefaultlib bls_if.obj %LDFLAGS% +rem cl /c %CFLAGS% src\bls.cpp +rem lib /OUT:lib\bls.lib /nodefaultlib bls.obj %LDFLAGS% +rem echo make bls256.lib +cl /c %CFLAGS% src\bls_c.cpp +rem lib /OUT:lib\bls256.lib /nodefaultlib bls_c.obj %LDFLAGS% echo make bls256.dll -link /nologo /DLL /OUT:bin\bls256.dll bls.obj bls_if.obj %LDFLAGS% /implib:lib\bls_if256.lib +link /nologo /DLL /OUT:bin\bls256.dll bls_c.obj %LDFLAGS% /implib:lib\bls256.lib @@ -1,6 +1,6 @@ @echo off -set BLS_MAX_OP_UNIT_SIZE=4 -echo BLS_MAX_OP_UNIT_SIZE=%BLS_MAX_OP_UNIT_SIZE% -set CFLAGS=/MT /DNOMINMAX /Ox /DNDEBUG /W4 /Zi /EHsc /nologo -I ./include -I../cybozulib/include -I../cybozulib_ext/include -I../mcl/include -set CFLAGS=%CFLAGS% -DBLS_MAX_OP_UNIT_SIZE=%BLS_MAX_OP_UNIT_SIZE% +set MCLBN_FP_UNIT_SIZE=4 +echo MCLBN_FP_UNIT_SIZE=%MCLBN_FP_UNIT_SIZE% +set CFLAGS=/MT /DNOMINMAX /Ox /DNDEBUG /W4 /Zi /EHsc /nologo -I ./include -I../cybozulib/include -I../cybozulib_ext/include -I../mcl/include -I../mcl +set CFLAGS=%CFLAGS% -DMCLBN_FP_UNIT_SIZE=%MCLBN_FP_UNIT_SIZE% set LDFLAGS=/LIBPATH:..\cybozulib_ext\lib /LIBPATH:.\lib /LIBPATH:..\mcl\lib |