diff --git a/sds/Makefile b/sds/Makefile index 4459480..ffe12ab 100644 --- a/sds/Makefile +++ b/sds/Makefile @@ -1,5 +1,10 @@ # Makefile for SDS Go Bindings +# The NIM_SDS_REPO_PATH env var should be defined beforehand and it represents the absolute path +# to the cloned nim-sds repository, i.e, ....../third_party/nim-sds +export CGO_CFLAGS="-I${NIM_SDS_REPO_PATH}/library/" +export CGO_LDFLAGS="-L${NIM_SDS_REPO_PATH}/build -lsds -Wl,-rpath,${NIM_SDS_REPO_PATH}/build" + .PHONY: all clean prepare build-libsds build # Default target @@ -11,7 +16,7 @@ prepare: @mkdir -p ../third_party @if [ ! -d "../third_party/nim-sds" ]; then \ - @echo "Cloning nim-sds repository..." + echo "Cloning nim-sds repository..." ; \ cd ../third_party/ && \ git clone https://github.com/waku-org/nim-sds && \ cd nim-sds && \ diff --git a/sds/sds.go b/sds/sds.go index cd8168e..c4253bd 100644 --- a/sds/sds.go +++ b/sds/sds.go @@ -1,10 +1,7 @@ package sds /* - #cgo LDFLAGS: -L../third_party/nim-sds/build/ -lsds - #cgo LDFLAGS: -L../third_party/nim-sds -Wl,-rpath,../third_party/nim-sds/build/ - - #include "../third_party/nim-sds/library/libsds.h" + #include #include #include