diff --git a/Makefile b/Makefile index ecc50ac..b988d25 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,14 @@ -ifeq ($(shell uname), Darwin) - CGO_LDFLAGS := -framework Security -endif - .PHONY: build build: build-tfhe-rs-capi - cd fhevm && CGO_LDFLAGS='$(CGO_LDFLAGS)' go build . + cd fhevm && go build . .PHONY: test test: build-tfhe-rs-capi - cd fhevm && 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 \ - && cd target/release && rm -f *.dylib *.dll *.so + cd tfhe-rs && make build_c_api_experimental_deterministic_fft .PHONY: clean clean: diff --git a/fhevm/tfhe.go b/fhevm/tfhe.go index 3eb6616..3b13160 100644 --- a/fhevm/tfhe.go +++ b/fhevm/tfhe.go @@ -17,8 +17,10 @@ package fhevm /* -#cgo CFLAGS: -O3 -I../tfhe-rs/target/release -#cgo LDFLAGS: -L../tfhe-rs/target/release -ltfhe -lm +#cgo linux CFLAGS: -O3 -I../tfhe-rs/target/release +#cgo linux LDFLAGS: -L../tfhe-rs/target/release -l:libtfhe.a -lm +#cgo darwin CFLAGS: -O3 -I../tfhe-rs/target/release ../tfhe-rs/target/release/libtfhe.a +#cgo darwin LDFLAGS: -framework Security -lm #include