sds-go-bindings/sds/Makefile

42 lines
973 B
Makefile
Raw Normal View History

2025-04-16 18:38:09 +03:00
# Makefile for SDS Go Bindings
2025-04-09 18:20:28 +03:00
.PHONY: all clean prepare build-libsds build
# Default target
all: build
# Prepare third_party directory and clone nim-sds
prepare:
@echo "Creating third_party directory..."
2025-08-25 17:06:04 +02:00
@mkdir -p ../third_party
2025-04-09 18:20:28 +03:00
2025-08-25 17:06:04 +02:00
@if [ ! -d "../third_party/nim-sds" ]; then \
@echo "Cloning nim-sds repository..."
2025-08-25 17:06:04 +02:00
cd ../third_party/ && \
2025-08-25 18:02:13 +02:00
git clone https://github.com/waku-org/nim-sds && \
cd nim-sds && \
git checkout master; \
2025-08-25 18:02:13 +02:00
make update; \
2025-04-09 18:20:28 +03:00
else \
echo "nim-sds repository already exists."; \
fi
2025-08-25 17:06:04 +02:00
# Build SDS Go Bindings
build: prepare
2025-04-09 18:20:28 +03:00
@echo "Building libsds..."
2025-08-25 18:02:13 +02:00
@cd ../third_party/nim-sds && make libsds
2025-08-25 17:06:04 +02:00
@echo "Building SDS Go Bindings..."
go build ./...
2025-04-09 18:20:28 +03:00
2025-08-25 17:06:04 +02:00
build-android: prepare
2025-08-25 17:54:46 +02:00
@echo "Building libsds for Android..."
2025-08-25 18:02:13 +02:00
@cd ../third_party/nim-sds && make libsds-android
2025-08-25 17:54:46 +02:00
@echo "Building SDS Go Bindings for Android..."
2025-04-09 18:20:28 +03:00
go build ./...
# Clean up generated files
clean:
@echo "Cleaning up..."
2025-08-25 17:06:04 +02:00
@rm -rf ../third_party/
@rm -f sds-go-bindings