30 lines
765 B
Makefile
Raw Normal View History

# Makefile for Logos Messaging Go Bindings
2024-11-27 12:08:50 +02:00
# Directories
THIRD_PARTY_DIR := $(shell pwd)/../third_party
2025-12-14 01:27:49 +05:30
LMN_REPO := https://github.com/logos-messaging/logos-messaging-nim
LMN_DIR := $(THIRD_PARTY_DIR)/logos-messaging-nim
2024-11-27 12:08:50 +02:00
.PHONY: all clean build-libwaku build
2024-11-27 12:08:50 +02:00
# Default target
all: build
2025-02-14 14:20:49 +02:00
# Build libwaku
build-libwaku:
2024-11-27 12:08:50 +02:00
@echo "Building libwaku..."
2025-12-14 01:27:49 +05:30
@cd $(LMN_DIR) && make libwaku
2024-11-27 12:08:50 +02:00
# Build Logos Messaging Go Bindings
2025-12-14 01:27:49 +05:30
build: export CGO_CFLAGS = "-I${LMN_DIR}/library/"
build: export CGO_LDFLAGS = "-L${LMN_DIR}/build/ -lwaku -L${LMN_DIR} -Wl,-rpath,${LMN_DIR}/build/"
build:
@echo "Building Logos Messaging Go Bindings..."
2025-01-22 18:58:23 +01:00
go build ./...
2024-11-27 12:08:50 +02:00
# Clean up generated files
clean:
@echo "Cleaning up..."
@rm -rf $(THIRD_PARTY_DIR)
@rm -f logos-messaging-go-bindings