adding makefile

This commit is contained in:
Gabriel mermelstein 2025-04-09 18:20:28 +03:00
parent 2ae300f187
commit 975fd83dd1
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D
4 changed files with 72 additions and 0 deletions

25
.gitignore vendored Normal file
View File

@ -0,0 +1,25 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
# Generated dependencies and cache
third_party
nimcache

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/waku-org/waku-go-bindings
go 1.22.10

43
sds/Makefile Normal file
View File

@ -0,0 +1,43 @@
# Makefile for Waku Go Bindings
# Directories
THIRD_PARTY_DIR := ../third_party
NIM_SDS_REPO := https://github.com/waku-org/nim-sds
NIM_SDS_DIR := $(THIRD_PARTY_DIR)/nim-sds
.PHONY: all clean prepare build-libsds build
# Default target
all: build
# Prepare third_party directory and clone nim-sds
# TODO: remove the "git checkout gabrielmer-feat-init-implementation" part
prepare:
@echo "Creating third_party directory..."
@mkdir -p $(THIRD_PARTY_DIR)
@echo "Cloning nim-sds repository..."
@if [ ! -d "$(NIM_SDS_DIR)" ]; then \
cd $(THIRD_PARTY_DIR) && \
git clone $(NIM_SDS_REPO) && \
cd $(NIM_SDS_DIR) && \
git checkout gabrielmer-feat-init-implementation; \
else \
echo "nim-sds repository already exists."; \
fi
# Build libsds
build-libsds: prepare
@echo "Building libsds..."
@cd $(NIM_SDS_DIR) && make libsds
# Build SDS Go Bindings
build: build-libsds
@echo "Building SDS Go Bindings..."
go build ./...
# Clean up generated files
clean:
@echo "Cleaning up..."
@rm -rf $(THIRD_PARTY_DIR)
@rm -f sds-go-bindings

1
sds/sds.go Normal file
View File

@ -0,0 +1 @@
package sds