aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-05-30 20:25:58 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-05-30 20:25:58 +0800
commitfba0d40500aed7a700efac8e311b84a75031a408 (patch)
tree913011215a496182137b82dc86527a6189cb3c6c
parent6d7c5863b165b3a5e6bc415d533b5a5f4d674b0c (diff)
downloaddexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar.gz
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar.bz2
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar.lz
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar.xz
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.tar.zst
dexon-bls-fba0d40500aed7a700efac8e311b84a75031a408.zip
use pkg-config
-rw-r--r--Makefile2
-rw-r--r--go/bls/bls.go5
2 files changed, 3 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1dd0b76..1dff327 100644
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,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
run_go: go/bls/bls.go go/bls/bls_test.go $(BLS_LIB) $(BLS_IF_LIB)
- cd go/bls && go test -tags $(GO_TAG) .
+ cd go/bls && env PKG_CONFIG_PATH=./ go test -tags $(GO_TAG) .
# cd go/bls && go test -tags $(GO_TAG) -v .
clean:
diff --git a/go/bls/bls.go b/go/bls/bls.go
index adcacff..91d5a24 100644
--- a/go/bls/bls.go
+++ b/go/bls/bls.go
@@ -1,11 +1,10 @@
package bls
/*
-#cgo CFLAGS:-I../../include -DBLS_MAX_OP_UNIT_SIZE=6
+#cgo pkg-config: bls
#cgo bn256 CFLAGS:-UBLS_MAX_OP_UNIT_SIZE -DBLS_MAX_OP_UNIT_SIZE=4
#cgo bn384 CFLAGS:-UBLS_MAX_OP_UNIT_SIZE -DBLS_MAX_OP_UNIT_SIZE=6
-#cgo LDFLAGS:-lbls -lbls_if -lmcl -lgmp -lgmpxx -L../lib -L../../lib -L../../../mcl/lib -L../../mcl/lib -lstdc++ -lcrypto
-#include "bls/bls_if.h"
+#include <bls/bls_if.h>
*/
import "C"
import "fmt"