-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (66 loc) · 1.97 KB
/
Makefile
File metadata and controls
88 lines (66 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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
##################
## 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 ##
##################
.PHONY: librln
LIBRLN_BUILDDIR := $(CURDIR)/vendor/zerokit
LIBRLN_VERSION := v0.3.7
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
##################
## WAKU UTILS ##
##################
waku-utils: | deps librln
nim wakuUtils $(NIM_PARAMS) status_node_manager.nims
waku-utils-example: | deps librln
nim wakuUtilsExamples $(NIM_PARAMS) status_node_manager.nims
###########################
## STATUS NODE MANAGER ##
###########################
status-node-manager: | deps librln
nim statusNodeManager $(NIM_PARAMS) status_node_manager.nims
test: | deps librln
nim test $(NIM_PARAMS) status_node_manager.nims