|
|
|
@ -97,7 +97,7 @@ $(EXE_DIR)/%256_test.exe: $(OBJ_DIR)/%256_test.o $(BLS256_LIB) $(MCL_LIB) |
|
|
|
|
# sample exe links libbls256.a
|
|
|
|
|
$(EXE_DIR)/%.exe: $(OBJ_DIR)/%.o $(BLS256_LIB) $(MCL_LIB) |
|
|
|
|
$(PRE)$(CXX) $< -o $@ $(BLS256_LIB) -L$(MCL_DIR)/lib -lmcl $(LDFLAGS)
|
|
|
|
|
ifneq ($(findstring $(OS),mac/mac-m1),) |
|
|
|
|
ifeq ($(findstring $(OS),mac/mac-m1),) |
|
|
|
|
install_name_tool bin/bls_smpl.exe -change lib/libmcl.dylib $(MCL_DIR)/lib/libmcl.dylib
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
@ -126,6 +126,7 @@ sample_test: $(EXE_DIR)/bls_smpl.exe |
|
|
|
|
# PATH is for mingw, LD_LIBRARY_PATH is for linux, DYLD_LIBRARY_PATH is for mac
|
|
|
|
|
COMMON_LIB_PATH="../../../lib:../../../../mcl/lib"
|
|
|
|
|
PATH_VAL=$$PATH:$(COMMON_LIB_PATH) LD_LIBRARY_PATH=$(COMMON_LIB_PATH) DYLD_LIBRARY_PATH=$(COMMON_LIB_PATH) CGO_LDFLAGS="-L../../../lib" CGO_CFLAGS="-I$(PWD)/include -I$(MCL_DIR)/include"
|
|
|
|
|
$(info $$PATH_VAL is [${PATH_VAL}]) |
|
|
|
|
test_go256: ffi/go/bls/bls.go ffi/go/bls/bls_test.go $(BLS256_SLIB) |
|
|
|
|
cd ffi/go/bls && env PATH=$(PATH_VAL) go test -tags bn256 .
|
|
|
|
|
test_go384: ffi/go/bls/bls.go ffi/go/bls/bls_test.go $(BLS384_SLIB) |
|
|
|
|