build(Makefile): Set up `libbacktrace` make instructions

This commit is contained in:
Emil Ivanichkov 2024-02-02 17:51:59 +02:00 committed by Emil Ivanichkov
parent 73ae79ce29
commit 982459187b
1 changed files with 29 additions and 2 deletions

View File

@ -10,6 +10,33 @@ ifeq ($(V), 0)
SILENT_TARGET_PREFIX :=
endif
##################
## 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)
# Extend deps and clean targets
ifneq ($(USE_LIBBACKTRACE), 0)
deps: | libbacktrace
endif
clean: | clean-libbacktrace
##################
## RLN ##
##################
@ -43,8 +70,8 @@ clean: | clean-librln
## WAKU UTILS ##
##################
waku-utils: | librln
waku-utils: | deps librln
nim wakuUtils $(NIM_PARAMS) status_node_manager.nims
waku-utils-example: | librln
waku-utils-example: | deps librln
nim wakuUtilsExamples $(NIM_PARAMS) status_node_manager.nims