mirror of
https://github.com/logos-messaging/sds-go-bindings.git
synced 2026-01-02 14:13:08 +00:00
pass the include and lib based on NIM_SDS_REPO_PATH env var
This commit is contained in:
parent
20404c85a0
commit
b501442965
@ -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 && \
|
||||
|
||||
@ -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 <libsds.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user