mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-08 00:43:09 +00:00
chore: update accordings to rename
This commit is contained in:
parent
cdad67ee80
commit
02c9a6afa6
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "third_party/nwaku"]
|
[submodule "third_party/nwaku"]
|
||||||
path = third_party/nwaku
|
path = vendor/nwaku
|
||||||
url = https://github.com/logos-messaging/logos-messaging-nim.git
|
url = https://github.com/logos-messaging/logos-messaging-nim.git
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# Makefile for Waku Go Bindings
|
# Makefile for Waku Go Bindings
|
||||||
|
|
||||||
# Path to logos-messaging-nim (nwaku) submodule
|
# 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)
|
# Default paths for libwaku library and headers (can be overridden)
|
||||||
LIBWAKU_HEADER_PATH ?= $(LMN_DIR)/library
|
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
|
HEADER_FILE := $(LIBWAKU_HEADER_PATH)/libwaku.h
|
||||||
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/libwaku.*)
|
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/libwaku.*)
|
||||||
|
|
||||||
.PHONY: all clean prepare build build-libwaku
|
.PHONY: all clean prepare build build-auto build-manual test-auto test-manual build-libwaku
|
||||||
|
|
||||||
# Default target
|
|
||||||
all: build
|
|
||||||
|
|
||||||
# Validate necessary folders and files
|
# Validate necessary folders and files
|
||||||
check-folders:
|
check-folders:
|
||||||
@ -47,13 +44,6 @@ check-folders:
|
|||||||
echo "ERROR: No libwaku library file found in: $(LIBWAKU_LIB_PATH)"; exit 1; \
|
echo "ERROR: No libwaku library file found in: $(LIBWAKU_LIB_PATH)"; exit 1; \
|
||||||
fi
|
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:
|
build-libwaku:
|
||||||
@echo "Checking/Building libwaku ..."
|
@echo "Checking/Building libwaku ..."
|
||||||
@if [ -f "$(HEADER_FILE)" ] && [ -n "$(LIB_FILES)" ]; then \
|
@if [ -f "$(HEADER_FILE)" ] && [ -n "$(LIB_FILES)" ]; then \
|
||||||
@ -68,6 +58,22 @@ build-libwaku:
|
|||||||
$(MAKE) -C $(LMN_DIR) libwaku; \
|
$(MAKE) -C $(LMN_DIR) libwaku; \
|
||||||
fi
|
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 up generated files
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning up..."
|
@echo "Cleaning up..."
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
package waku
|
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 <libwaku.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user