2024-02-02 14:15:20 +00:00
|
|
|
# verbosity level
|
|
|
|
V := 0
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) --verbosity:$(V)
|
|
|
|
HANDLE_OUTPUT :=
|
|
|
|
SILENT_TARGET_PREFIX := disabled
|
|
|
|
ifeq ($(V), 0)
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) --hints:off
|
|
|
|
# don't swallow stderr, in case it's important
|
|
|
|
HANDLE_OUTPUT := >/dev/null
|
|
|
|
SILENT_TARGET_PREFIX :=
|
|
|
|
endif
|
|
|
|
|
2024-02-02 15:51:59 +00:00
|
|
|
##################
|
|
|
|
## Dependencies ##
|
|
|
|
##################
|
|
|
|
.PHONY: deps libbacktrace
|
|
|
|
|
|
|
|
### nim-libbacktrace
|
|
|
|
|
|
|
|
# "-d:release" implies "--stacktrace:off" and it cannot be added to config.nims
|
|
|
|
ifeq ($(USE_LIBBACKTRACE), 0)
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:debug -d:disable_libbacktrace
|
|
|
|
else
|
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:release
|
|
|
|
endif
|
|
|
|
|
|
|
|
libbacktrace:
|
|
|
|
+ $(MAKE) -C nimble_develop/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
|
|
|
|
|
|
|
clean-libbacktrace:
|
|
|
|
+ $(MAKE) -C nimble_develop/nim-libbacktrace clean $(HANDLE_OUTPUT)
|
|
|
|
|
2024-03-14 11:36:36 +00:00
|
|
|
# # Extend deps and clean targets
|
|
|
|
# ifneq ($(USE_LIBBACKTRACE), 0)
|
|
|
|
# deps: | libbacktrace
|
|
|
|
# endif
|
2024-02-02 15:51:59 +00:00
|
|
|
|
|
|
|
clean: | clean-libbacktrace
|
|
|
|
|
2024-01-10 12:17:38 +00:00
|
|
|
##################
|
|
|
|
## RLN ##
|
|
|
|
##################
|
|
|
|
.PHONY: librln
|
|
|
|
|
|
|
|
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
|
2024-04-24 08:55:49 +00:00
|
|
|
LIBRLN_VERSION := v0.3.7
|
2024-01-10 12:17:38 +00:00
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
LIBRLN_FILE := rln.lib
|
|
|
|
else
|
|
|
|
LIBRLN_FILE := librln_$(LIBRLN_VERSION).a
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(LIBRLN_FILE):
|
|
|
|
echo -e $(BUILD_MSG) "$@" && \
|
|
|
|
./scripts/build_rln.sh $(LIBRLN_BUILDDIR) $(LIBRLN_VERSION) $(LIBRLN_FILE)
|
|
|
|
|
|
|
|
|
|
|
|
librln: | $(LIBRLN_FILE)
|
|
|
|
$(eval NIM_PARAMS += --passL:$(LIBRLN_FILE) --passL:-lm)
|
|
|
|
|
|
|
|
clean-librln:
|
|
|
|
cargo clean --manifest-path vendor/zerokit/rln/Cargo.toml
|
|
|
|
rm -f $(LIBRLN_FILE)
|
|
|
|
|
|
|
|
# Extend clean target
|
|
|
|
clean: | clean-librln
|
2024-01-10 20:14:13 +00:00
|
|
|
|
|
|
|
##################
|
|
|
|
## WAKU UTILS ##
|
|
|
|
##################
|
|
|
|
|
2024-02-02 15:51:59 +00:00
|
|
|
waku-utils: | deps librln
|
2024-01-13 13:20:46 +00:00
|
|
|
nim wakuUtils $(NIM_PARAMS) status_node_manager.nims
|
2024-01-10 20:14:13 +00:00
|
|
|
|
2024-02-02 15:51:59 +00:00
|
|
|
waku-utils-example: | deps librln
|
2024-01-13 13:20:46 +00:00
|
|
|
nim wakuUtilsExamples $(NIM_PARAMS) status_node_manager.nims
|
2024-02-14 14:45:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
## STATUS NODE MANAGER ##
|
|
|
|
###########################
|
|
|
|
|
|
|
|
status-node-manager: | deps librln
|
|
|
|
nim statusNodeManager $(NIM_PARAMS) status_node_manager.nims
|
2024-03-13 16:15:52 +00:00
|
|
|
|
|
|
|
test: | deps librln
|
|
|
|
nim test $(NIM_PARAMS) status_node_manager.nims
|