Skip to content

Commit

Permalink
Merge branch 'main' into add-and-decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zk authored Oct 17, 2023
2 parents 300e97e + e7e2f23 commit 24df344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TFHE_RS_FOLDER=${ROOT_DIR}/tfhe-rs/
TFHE_BUILD_DIR=${TFHE_RS_FOLDER}/target/release/
CGO_CFLAGS="-I${TFHE_BUILD_DIR}"
CGO_LDFLAGS="-L${TFHE_BUILD_DIR}"

.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
4 changes: 2 additions & 2 deletions fhevm/tfhe.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package fhevm

/*
#cgo CFLAGS: -O3 -I.
#cgo LDFLAGS: -ltfhe -lm
#cgo CFLAGS: -O3 -I../tfhe-rs/target/release
#cgo LDFLAGS: -L../tfhe-rs/target/release -l:libtfhe.a -lm
#include <tfhe.h>
Expand Down

0 comments on commit 24df344

Please sign in to comment.