mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-07-04 09:49:27 +00:00
build: point Makefile and README at the unified liblogosdelivery
library/ is removed upstream and -lwaku no longer exists, so the header now lives under liblogosdelivery/ and the link flag is -llogosdelivery. Variable names are kept to minimise churn; only the resolved paths, checked filenames and docs change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a618e09afe
commit
0b97661148
14
README.md
14
README.md
@ -10,7 +10,9 @@ go get -u github.com/logos-messaging/logos-delivery-go-bindings
|
||||
|
||||
## Building & Dependencies
|
||||
|
||||
`libwaku` (from `logos-delivery`) is required at compile-time.
|
||||
`liblogosdelivery` (from `logos-delivery`) is required at compile-time. Since
|
||||
logos-delivery#3949 it is a single library exposing both the `waku_*` Kernel
|
||||
API and the `logosdelivery_*` Messaging API.
|
||||
|
||||
### Building with Makefile
|
||||
|
||||
@ -19,8 +21,8 @@ If you have `logos-delivery` checked out, point the build to it:
|
||||
```bash
|
||||
# path to your existing logos-delivery clone
|
||||
export LOGOS_DELIVERY_DIR=/absolute/path/to/logos-delivery
|
||||
export CGO_CFLAGS="-I${LOGOS_DELIVERY_DIR}/library"
|
||||
export CGO_LDFLAGS="-L${LOGOS_DELIVERY_DIR}/build -lwaku -Wl,-rpath,${LOGOS_DELIVERY_DIR}/build"
|
||||
export CGO_CFLAGS="-I${LOGOS_DELIVERY_DIR}/liblogosdelivery"
|
||||
export CGO_LDFLAGS="-L${LOGOS_DELIVERY_DIR}/build -llogosdelivery -Wl,-rpath,${LOGOS_DELIVERY_DIR}/build"
|
||||
|
||||
# compile all packages
|
||||
make -C pkg/kernel build
|
||||
@ -36,12 +38,12 @@ make -C pkg/kernel test TEST=TestConnectedPeersInfo
|
||||
|
||||
When working on this repository itself, `logos-delivery` is included as a git submodule for convenience.
|
||||
|
||||
- Initialize and update the submodule, then build `libwaku`
|
||||
- Initialize and update the submodule, then build `liblogosdelivery`
|
||||
```sh
|
||||
git submodule update --init --recursive
|
||||
make -C pkg/kernel build-libwaku
|
||||
make -C vendor/logos-delivery liblogosdelivery
|
||||
```
|
||||
- Build the project. Submodule paths are used by default to find `libwaku`.
|
||||
- Build the project. Submodule paths are used by default to find `liblogosdelivery`.
|
||||
```shell
|
||||
make -C pkg/kernel build
|
||||
```
|
||||
|
||||
@ -9,22 +9,24 @@ print-paths:
|
||||
@echo "HEADER_PATH: $(LIBWAKU_HEADER_PATH)"
|
||||
@echo "LIB_PATH: $(LIBWAKU_LIB_PATH)"
|
||||
|
||||
# Default paths for libwaku library and headers (can be overridden)
|
||||
export LIBWAKU_HEADER_PATH ?= $(LOGOS_DELIVERY_DIR)/library
|
||||
# Default paths for the liblogosdelivery library and headers (can be
|
||||
# overridden). Since logos-delivery#3949 the waku_* ABI ships inside the
|
||||
# unified liblogosdelivery, so library/ is gone and -lwaku no longer exists.
|
||||
export LIBWAKU_HEADER_PATH ?= $(LOGOS_DELIVERY_DIR)/liblogosdelivery
|
||||
export LIBWAKU_LIB_PATH ?= $(LOGOS_DELIVERY_DIR)/build
|
||||
|
||||
export CGO_CFLAGS := -I$(LIBWAKU_HEADER_PATH)/
|
||||
export CGO_LDFLAGS := -L$(LIBWAKU_LIB_PATH)/ -lwaku -Wl,-rpath,$(LIBWAKU_LIB_PATH)/
|
||||
export CGO_LDFLAGS := -L$(LIBWAKU_LIB_PATH)/ -llogosdelivery -Wl,-rpath,$(LIBWAKU_LIB_PATH)/
|
||||
|
||||
# Expected files
|
||||
HEADER_FILE := $(LIBWAKU_HEADER_PATH)/libwaku.h
|
||||
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/libwaku.*)
|
||||
HEADER_FILE := $(LIBWAKU_HEADER_PATH)/liblogosdelivery.h
|
||||
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/liblogosdelivery.*)
|
||||
|
||||
.PHONY: all clean prepare build test build-auto test-auto build-libwaku
|
||||
|
||||
# Validate necessary folders and files
|
||||
check-folders:
|
||||
@echo Checking libwaku header directory ...
|
||||
@echo Checking liblogosdelivery header directory ...
|
||||
@if [ -z "$(LIBWAKU_HEADER_PATH)" ]; then \
|
||||
echo "ERROR: LIBWAKU_HEADER_PATH not set"; exit 1; \
|
||||
fi
|
||||
@ -32,7 +34,7 @@ check-folders:
|
||||
echo "ERROR: Header path does not exist: $(LIBWAKU_HEADER_PATH)"; exit 1; \
|
||||
fi
|
||||
|
||||
@echo Checking libwaku lib directory ...
|
||||
@echo Checking liblogosdelivery lib directory ...
|
||||
@if [ -z "$(LIBWAKU_LIB_PATH)" ]; then \
|
||||
echo "ERROR: LIBWAKU_LIB_PATH not set"; exit 1; \
|
||||
fi
|
||||
@ -40,14 +42,14 @@ check-folders:
|
||||
echo "ERROR: Library path does not exist: $(LIBWAKU_LIB_PATH)"; exit 1; \
|
||||
fi
|
||||
|
||||
@echo Checking for libwaku.h ...
|
||||
@echo Checking for liblogosdelivery.h ...
|
||||
@if [ ! -f "$(HEADER_FILE)" ]; then \
|
||||
echo "ERROR: libwaku.h not found at: $(HEADER_FILE)"; exit 1; \
|
||||
echo "ERROR: liblogosdelivery.h not found at: $(HEADER_FILE)"; exit 1; \
|
||||
fi
|
||||
|
||||
@echo Checking for libwaku library file ...
|
||||
@echo Checking for liblogosdelivery library file ...
|
||||
@if [ -z "$(LIB_FILES)" ]; then \
|
||||
echo "ERROR: No libwaku library file found in: $(LIBWAKU_LIB_PATH)"; exit 1; \
|
||||
echo "ERROR: No liblogosdelivery library file found in: $(LIBWAKU_LIB_PATH)"; exit 1; \
|
||||
fi
|
||||
|
||||
build:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user