chore: update accordings to rename

This commit is contained in:
darshankabariya 2025-12-20 01:11:10 +05:30
parent cdad67ee80
commit 02c9a6afa6
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
3 changed files with 22 additions and 13 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "third_party/nwaku"]
path = third_party/nwaku
path = vendor/nwaku
url = https://github.com/logos-messaging/logos-messaging-nim.git

View File

@ -1,7 +1,7 @@
# Makefile for Waku Go Bindings
# Path to logos-messaging-nim (nwaku) submodule
LMN_DIR ?= $(shell pwd)/../third_party/nwaku
LMN_DIR ?= $(shell pwd)/../vendor/logos-messaging-nim/
# Default paths for libwaku library and headers (can be overridden)
LIBWAKU_HEADER_PATH ?= $(LMN_DIR)/library
@ -14,10 +14,7 @@ export CGO_LDFLAGS := -L$(LIBWAKU_LIB_PATH)/ -lwaku -Wl,-rpath,$(LIBWAKU_LIB_PAT
HEADER_FILE := $(LIBWAKU_HEADER_PATH)/libwaku.h
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/libwaku.*)
.PHONY: all clean prepare build build-libwaku
# Default target
all: build
.PHONY: all clean prepare build build-auto build-manual test-auto test-manual build-libwaku
# Validate necessary folders and files
check-folders:
@ -47,13 +44,6 @@ check-folders:
echo "ERROR: No libwaku library file found in: $(LIBWAKU_LIB_PATH)"; exit 1; \
fi
# Build SDS Go Bindings
build: build-libwaku
@echo "Building Waku Go Bindings..."
go build ./waku
# Build libwaku from the nwaku submodule
# Build libwaku once (clone if needed). Skips work when headers & libs already exist.
build-libwaku:
@echo "Checking/Building libwaku ..."
@if [ -f "$(HEADER_FILE)" ] && [ -n "$(LIB_FILES)" ]; then \
@ -68,6 +58,22 @@ build-libwaku:
$(MAKE) -C $(LMN_DIR) libwaku; \
fi
build-auto: build-libwaku check-folders
@echo "Building Waku Go Bindings (auto)..."
go build ./
build-manual: build-libwaku check-folders
@echo "Building Waku Go Bindings (manual)..."
go build ./waku
test-auto: build-auto
@echo "Running tests (auto)..."
go test ./
test-manual: build-manual
@echo "Running tests (manual)..."
go test ./waku
# Clean up generated files
clean:
@echo "Cleaning up..."

View File

@ -1,6 +1,9 @@
package waku
/*
#cgo CFLAGS: -I${SRCDIR}/../vendor/nwaku/library
#cgo LDFLAGS: -L${SRCDIR}/../vendor/nwaku/build -lwaku -Wl,-rpath,${SRCDIR}/../vendor/nwaku/build
#include <libwaku.h>
#include <stdio.h>
#include <stdlib.h>