diff --git a/Makefile b/Makefile index 3a4e097..b988d25 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,15 @@ -ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -TFHE_RS_FOLDER=${ROOT_DIR}/tfhe-rs/ -CGO_CFLAGS="-I${TFHE_RS_FOLDER}/target/release/" -CGO_LDFLAGS="-L${TFHE_RS_FOLDER}/target/release/" - .PHONY: build build: build-tfhe-rs-capi - cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go build . + cd fhevm && go build . .PHONY: test test: build-tfhe-rs-capi - cd fhevm && CGO_CFLAGS=${CGO_CFLAGS} CGO_LDFLAGS=${CGO_LDFLAGS} go test -v . + cd fhevm && go test -v . .PHONY: build-tfhe-rs-capi build-tfhe-rs-capi: cd tfhe-rs && make build_c_api_experimental_deterministic_fft + +.PHONY: clean +clean: + cd tfhe-rs && cargo clean diff --git a/fhevm/tfhe.go b/fhevm/tfhe.go index b9ed79a..685767f 100644 --- a/fhevm/tfhe.go +++ b/fhevm/tfhe.go @@ -17,8 +17,8 @@ package fhevm /* -#cgo CFLAGS: -O3 -I. -#cgo LDFLAGS: -l:libtfhe.a -lm +#cgo CFLAGS: -O3 -I../tfhe-rs/target/release +#cgo LDFLAGS: -L../tfhe-rs/target/release -l:libtfhe.a -lm #include