-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathMakefile
More file actions
528 lines (438 loc) · 19.2 KB
/
Copy pathMakefile
File metadata and controls
528 lines (438 loc) · 19.2 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# Copyright (c) 2018-2026 Status Research & Development GmbH. Licensed under
# either of:
# - Apache License, version 2.0
# - MIT license
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
SHELL := bash # the shell used internally by "make"
# used inside the included makefiles
BUILD_SYSTEM_DIR := vendor/nimbus-build-system
LINK_PCRE := 0
EXCLUDED_NIM_PACKAGES := \
vendor/nimbus-eth2/vendor/nim-bearssl \
vendor/nimbus-eth2/vendor/nim-blscurve \
vendor/nimbus-eth2/vendor/nim-bearssl \
vendor/nimbus-eth2/vendor/nim-blscurve \
vendor/nimbus-eth2/vendor/nim-boringssl \
vendor/nimbus-eth2/vendor/nimbus-build-system \
vendor/nimbus-eth2/vendor/nim-chronicles \
vendor/nimbus-eth2/vendor/nim-chronos \
vendor/nimbus-eth2/vendor/nim-confutils \
vendor/nimbus-eth2/vendor/nimcrypto \
vendor/nimbus-eth2/vendor/nim-eth \
vendor/nimbus-eth2/vendor/nim-faststreams \
vendor/nimbus-eth2/vendor/nim-http-utils \
vendor/nimbus-eth2/vendor/nim-ngtcp2 \
vendor/nimbus-eth2/vendor/nim-quic \
vendor/nimbus-eth2/vendor/nim-intops \
vendor/nimbus-eth2/vendor/nim-json-rpc \
vendor/nimbus-eth2/vendor/nim-json-serialization \
vendor/nimbus-eth2/vendor/nim-libbacktrace \
vendor/nimbus-eth2/vendor/nim-metrics \
vendor/nimbus-eth2/vendor/nim-nat-traversal \
vendor/nimbus-eth2/vendor/nim-lsquic \
vendor/nimbus-eth2/vendor/nim-results \
vendor/nimbus-eth2/vendor/nim-secp256k1 \
vendor/nimbus-eth2/vendor/nim-serialization \
vendor/nimbus-eth2/vendor/nim-snappy \
vendor/nimbus-eth2/vendor/nim-sqlite3-abi \
vendor/nimbus-eth2/vendor/nim-ssz-serialization \
vendor/nimbus-eth2/vendor/nim-stew \
vendor/nimbus-eth2/vendor/nim-stint \
vendor/nimbus-eth2/vendor/nim-testutils \
vendor/nimbus-eth2/vendor/nim-toml-serialization \
vendor/nimbus-eth2/vendor/nim-unittest2 \
vendor/nimbus-eth2/vendor/nim-web3 \
vendor/nimbus-eth2/vendor/nim-websock \
vendor/nimbus-eth2/vendor/nim-zlib \
vendor/nimbus-eth2/vendor/nim-taskpools \
vendor/nimbus-eth2/vendor/nim-normalize \
vendor/nimbus-eth2/vendor/nim-unicodedb \
vendor/nimbus-eth2/vendor/nim-libp2p \
vendor/nimbus-eth2/vendor/nim-presto \
vendor/nimbus-eth2/vendor/nim-zxcvbn \
vendor/nimbus-eth2/vendor/nim-kzg4844 \
vendor/nimbus-eth2/vendor/nim-minilru \
vendor/nimbus-eth2/vendor/nimbus-security-resources \
vendor/nimbus-eth2/vendor/nim-protobuf-serialization \
vendor/nimbus-eth2/vendor/NimYAML
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
# debugging tools + testing tools
TOOLS := \
nrpc \
nimbus_history_exporter \
test_tools_build
TOOLS_DIRS := \
nrpc \
tools/nimbus_history_exporter \
tests
# comma-separated values for the "clean" target
TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))
# Portal debugging tools + testing tools
PORTAL_TOOLS := \
nimbus_portal_bridge \
eth_data_exporter \
portalcli \
fcli_db
PORTAL_TOOLS_DIRS := \
portal/bridge \
portal/bridge/common \
portal/bridge/beacon \
portal/bridge/history \
portal/tools
# comma-separated values for the "clean" target
PORTAL_TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(PORTAL_TOOLS))
# Namespaced variables to avoid conflicts with other makefiles
OS_PLATFORM = $(shell $(CC) -dumpmachine)
VERIF_PROXY_OUT_PATH ?= build/libverifproxy/
ifneq (, $(findstring darwin, $(OS_PLATFORM)))
VERIFPROXY_LDFLAGS = -lc++ -framework Security
else ifneq (, $(findstring windows, $(OS_PLATFORM)))
VERIFPROXY_LDFLAGS = -lc++ -lbcrypt -lpthread -lws2_32
else
VERIFPROXY_LDFLAGS = -lstdc++ -lm
endif
.PHONY: \
all \
$(TOOLS) \
$(FLUFFY_TOOLS) \
deps \
update \
nimbus \
nimbus_execution_client \
nimbus_portal_client \
fluffy \
nimbus_verified_proxy \
nimbus_verified_proxy_test \
libverifproxy \
libverifproxy_test \
nimbus_verified_proxy_go_test \
nimbus_verified_proxy_wasm \
nimbus_verified_proxy_wasm_debug \
external_sync \
test \
test-reproducibility \
clean \
libnimbus.so \
libnimbus.a \
libbacktrace \
rocksdb \
dist-linux-amd64 \
dist-linux-arm64 \
dist-windows-amd64 \
dist-macos-arm64 \
dist \
eest \
eest_engine \
eest_engine_test \
eest_blockchain \
eest_blockchain_test \
eest_stateless_execution_test \
eest_txpool_test \
eest_full_test \
eest_tool_test \
t8n \
t8n_test \
evmstate \
evmstate_test
ifeq ($(NIM_PARAMS),)
# "variables.mk" was not included, so we update the submodules.
# selectively download nimbus-eth2 submodules because we don't need all of it's modules
# also hoodi already exceeds github LFS quota
GIT_SUBMODULE_CONFIG := -c lfs.fetchexclude=/public-keys/all.txt,/metadata/genesis.ssz,/parsed/parsedConsensusGenesis.json
GIT_SUBMODULE_UPDATE := git -c submodule."vendor/nimbus-eth2".update=none submodule update --init --recursive; \
git $(GIT_SUBMODULE_CONFIG) submodule update vendor/nimbus-eth2; \
cd vendor/nimbus-eth2; \
git $(GIT_SUBMODULE_CONFIG) submodule update --init vendor/sepolia; \
git $(GIT_SUBMODULE_CONFIG) submodule update --init vendor/hoodi; \
git $(GIT_SUBMODULE_CONFIG) submodule update --init vendor/gnosis-chain-configs; \
git $(GIT_SUBMODULE_CONFIG) submodule update --init --recursive vendor/nim-kzg4844; \
git $(GIT_SUBMODULE_CONFIG) submodule update --init vendor/mainnet; \
cd ../..
.DEFAULT:
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
$(GIT_SUBMODULE_UPDATE); \
echo
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
# https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles
#
# After restarting, it will execute its original goal, so we don't have to start a child Make here
# with "$(MAKE) $(MAKECMDGOALS)". Isn't hidden control flow great?
else # "variables.mk" was included. Business as usual until the end of this file.
# default target, because it's the first one that doesn't start with '.'
all: | $(TOOLS) nimbus nimbus_execution_client
# must be included after the default target
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
# "-d:release" cannot be added to config.nims
NIM_PARAMS += -d:release
ifneq ($(if $(ENABLE_LINE_NUMBERS),$(ENABLE_LINE_NUMBERS),0),0)
NIM_PARAMS += -d:chronicles_line_numbers:1
endif
ifeq ($(DISABLE_MARCH_NATIVE),1)
NIM_PARAMS += -d:disableMarchNative
endif
ifeq ($(BOEHM_GC),1)
NIM_PARAMS += --mm:boehm
endif
T8N_PARAMS := -d:chronicles_default_output_device=stderr -d:use_system_rocksdb
ifeq ($(USE_LIBBACKTRACE), 0)
NIM_PARAMS += -d:disable_libbacktrace
endif
# Used in docker/dist/entry_point.sh
# To avoid confusion with USE_SYSTEM_ROCKSDB
ifeq ($(USE_CACHED_ROCKSDB), 1)
USE_SYSTEM_ROCKSDB = 1
endif
deps: | deps-common nat-libs nimbus.nims
# eth protocol settings, rules from "execution_chain/sync/protocol/eth/variables.mk"
NIM_PARAMS := $(NIM_PARAMS) $(NIM_ETH_PARAMS)
#- deletes and recreates "nimbus.nims" which on Windows is a copy instead of a proper symlink
update: | update-common
rm -rf nimbus.nims && \
$(MAKE) nimbus.nims $(HANDLE_OUTPUT)
init: | sanity-checks update-test
rm -rf nimbus.nims && \
$(MAKE) nimbus.nims $(HANDLE_OUTPUT)
+ "$(MAKE)" --no-print-directory deps-common
# builds the tools, wherever they are
$(TOOLS): | build deps rocksdb
for D in $(TOOLS_DIRS); do [ -e "$${D}/$@.nim" ] && TOOL_DIR="$${D}" && break; done && \
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "$${TOOL_DIR}/$@.nim"
tools: | $(TOOLS)
nimbus_execution_client: | build deps rocksdb
echo -e $(BUILD_MSG) "build/nimbus_execution_client" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/nimbus_execution_client "execution_chain/nimbus_execution_client.nim"
check_revision: nimbus_execution_client
scripts/check_revision.sh
nimbus: | build deps rocksdb
echo -e $(BUILD_MSG) "build/nimbus" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/nimbus "execution_chain/nimbus.nim"
# symlink
nimbus.nims:
ln -s nimbus.nimble $@
# nim-rocksdb
ROCKSDB_CI_CACHE := build/rocksdb
rocksdb:
ifneq ($(USE_SYSTEM_ROCKSDB), 1)
+ MAKE="$(MAKE)" \
scripts/rocksdb_ci_cache.sh $(ROCKSDB_CI_CACHE)
else
ifeq ($(USE_CACHED_ROCKSDB), 1)
@echo "Using cached RocksDB"
else
@echo "Using system RocksDB"
endif
endif
eest:
scripts/eest_ci_cache.sh
# builds and runs the nimbus test suite
test: | build deps rocksdb eest
$(ENV_SCRIPT) nim test $(NIM_PARAMS) nimbus.nims
test_import: nimbus_execution_client
$(ENV_SCRIPT) nim test_import $(NIM_PARAMS) nimbus.nims
# builds and runs an EVM-related subset of the nimbus test suite
test-evm: | build deps rocksdb
$(ENV_SCRIPT) nim test_evm $(NIM_PARAMS) nimbus.nims
build_fuzzers:
$(ENV_SCRIPT) nim build_fuzzers $(NIM_PARAMS) nimbus.nims
# Primitive reproducibility test.
#
# On some platforms, with some GCC versions, it may not be possible to get a
# deterministic order for debugging info sections - even with
# "-frandom-seed=...". Striping the binaries should make them identical, though.
test-reproducibility:
+ [ -e build/nimbus_execution_client ] || $(MAKE) V=0 nimbus_execution_client; \
MD5SUM1=$$($(MD5SUM) build/nimbus_execution_client | cut -d ' ' -f 1) && \
rm -rf nimcache/*/nimbus_execution_client && \
$(MAKE) V=0 nimbus_execution_client && \
MD5SUM2=$$($(MD5SUM) build/nimbus_execution_client | cut -d ' ' -f 1) && \
[ "$$MD5SUM1" = "$$MD5SUM2" ] && echo -e "\e[92mSuccess: identical binaries.\e[39m" || \
{ echo -e "\e[91mFailure: the binary changed between builds.\e[39m"; exit 1; }
# Portal related targets
nimbus_portal_client: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "portal/client/$@.nim"
# alias for nimbus_portal_client
portal: | nimbus_portal_client
# primitive reproducibility test for nimbus_portal_client
portal-test-reproducibility:
+ [ -e build/portal ] || $(MAKE) V=0 nimbus_portal_client; \
MD5SUM1=$$($(MD5SUM) build/nimbus_portal_client | cut -d ' ' -f 1) && \
rm -rf nimcache/*/nimbus_portal_client && \
$(MAKE) V=0 nimbus_portal_client && \
MD5SUM2=$$($(MD5SUM) build/nimbus_portal_client | cut -d ' ' -f 1) && \
[ "$$MD5SUM1" = "$$MD5SUM2" ] && echo -e "\e[92mSuccess: identical binaries.\e[39m" || \
{ echo -e "\e[91mFailure: the binary changed between builds.\e[39m"; exit 1; }
# builds and runs the Portal test suite
all_portal_tests: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_log_level=ERROR -o:build/$@ "portal/tests/$@.nim"
# alias for all_portal_tests
portal-test: | all_portal_tests
# builds the Portal tools, wherever they are
$(PORTAL_TOOLS): | build deps
for D in $(PORTAL_TOOLS_DIRS); do [ -e "$${D}/$@.nim" ] && TOOL_DIR="$${D}" && break; done && \
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "$${TOOL_DIR}/$@.nim"
# builds all the Portal tools
portal-tools: | $(PORTAL_TOOLS)
# Build test_portal_testnet
test_portal_testnet: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -o:build/$@ "portal/scripts/$@.nim"
# builds the uTP test app
utp-test-app: | build deps
$(ENV_SCRIPT) nim utp_test_app $(NIM_PARAMS) nimbus.nims
# builds and runs the utp integration test suite
utp-test: | build deps
$(ENV_SCRIPT) nim utp_test $(NIM_PARAMS) nimbus.nims
# Deprecated legacy targets, to be removed sometime in the future
# Legacy target, same as nimbus_portal_client, deprecated
fluffy: | build deps
echo -e "\033[0;31mWarning:\033[0m The fluffy target and binary is deprecated, use 'make nimbus_portal_client' instead"
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "portal/client/nimbus_portal_client.nim"
# Legacy target, same as nimbus_portal_bridge, deprecated
portal_bridge: | build deps
echo -e "\033[0;31mWarning:\033[0m The portal_bridge target and binary is deprecated, use 'make nimbus_portal_bridge' instead"
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_log_level=TRACE -o:build/$@ "portal/bridge/nimbus_portal_bridge.nim"
# Nimbus Verified Proxy related targets
nimbus_verified_proxy: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -o:build/$@ $(NIM_PARAMS) -d:chronicles_log_level=TRACE nimbus_verified_proxy/nimbus_verified_proxy.nim
nimbus_verified_proxy_test: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) nimbus_verified_proxy/tests/all_proxy_tests.nim
rm nimbus_verified_proxy/tests/all_proxy_tests
$(VERIF_PROXY_OUT_PATH)/libverifproxy.a:
echo -e $(BUILD_MSG) "build/libverifproxy" && \
$(ENV_SCRIPT) nim c \
--out:$@ \
$(NIM_PARAMS) \
nimbus_verified_proxy/library/verifproxy.nim
cp nimbus_verified_proxy/library/verifproxy.h $(VERIF_PROXY_OUT_PATH)/
libverifproxy: | build deps
libverifproxy: $(VERIF_PROXY_OUT_PATH)/libverifproxy.a
libverifproxy_test: $(VERIF_PROXY_OUT_PATH)/libverifproxy.a
$(CC) -I$(VERIF_PROXY_OUT_PATH) -L$(VERIF_PROXY_OUT_PATH) \
-Wno-incompatible-pointer-types \
-o build/$@ \
tests/library/test_api.c \
-lverifproxy $(VERIFPROXY_LDFLAGS)
./build/$@
GO_BINDINGS_DIR := nimbus_verified_proxy/library/bindings/go
GO_LIB_DIR := $(GO_BINDINGS_DIR)/verifproxy/lib
nimbus_verified_proxy_go_test: $(VERIF_PROXY_OUT_PATH)/libverifproxy.a
echo -e $(BUILD_MSG) "go test $(GO_BINDINGS_DIR)" && \
mkdir -p "$(GO_LIB_DIR)" && \
cp "$(VERIF_PROXY_OUT_PATH)/libverifproxy.a" \
"$(GO_LIB_DIR)/libverifproxy.a" && \
cp nimbus_verified_proxy/library/verifproxy.h \
"$(GO_LIB_DIR)/verifproxy.h" && \
cd "$(GO_BINDINGS_DIR)" && \
go test ./...
nimbus_verified_proxy_wasm: | build deps
@mkdir -p $(CURDIR)/build/$@
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c \
-d:emscripten \
-d:release \
-d:disable_libbacktrace \
-o:"$(CURDIR)/build/$@/verifproxy_wasm.js" \
nimbus_verified_proxy/library/bindings/wasm/verifproxy_wasm.nim
cp nimbus_verified_proxy/library/bindings/wasm/verifproxy.js $(CURDIR)/build/$@/
nimbus_verified_proxy_wasm_debug: | build deps
@mkdir -p $(CURDIR)/build/$@
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c \
-d:emscripten \
-d:debug \
-d:disable_libbacktrace \
-o:"$(CURDIR)/build/$@/verifproxy_wasm.js" \
nimbus_verified_proxy/library/bindings/wasm/verifproxy_wasm.nim
cp nimbus_verified_proxy/library/bindings/wasm/verifproxy.js $(CURDIR)/build/$@/
# Stateless related targets
stateless_execution_baremetal: | build deps
$(ENV_SCRIPT) nim c --hints:off --cpu:riscv64 --os:any --mm:arc -d:useMalloc -d:chronicles_enabled:off -u:metrics --threads:off --stackTrace:off -d:disable_libbacktrace --compileOnly --genScript "execution_chain/stateless/stateless_execution.nim"
stateless_execution_test: | build deps
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_log_level=ERROR -o:build/$@ "tests/test_stateless/test_stateless_execution.nim"
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) --mm:arc -d:useMalloc -d:chronicles_log_level=ERROR -o:build/$@ "tests/test_stateless/test_stateless_execution.nim"
# EEST standalone targets - binary to run individual test vector files
eest_engine: | build deps
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
eest_blockchain: | build deps
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
# EEST test suite targets - to run the whole test suite for each category
eest_engine_test: | build deps eest
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
eest_txpool_test: | build deps eest
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
eest_blockchain_test: | build deps eest
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
eest_stateless_execution_test: | build deps eest
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/$@.nim"
eest_full_test: | build deps eest
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/all_eest_tests.nim"
build/$@
eest_tool_test: | build deps eest
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:chronicles_enabled:off -o:build/$@ "tests/eest/eest_tool_tests.nim"
build/$@
# builds transition tool
t8n: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) $(T8N_PARAMS) "tools/t8n/$@.nim"
# builds and runs transition tool test suite
t8n_test: | build deps t8n
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_default_output_device=stderr "tools/t8n/$@.nim"
# builds evm state test tool
evmstate: | build deps rocksdb
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c $(NIM_PARAMS) "tools/evmstate/$@.nim"
# builds and runs evm state tool test suite
evmstate_test: | build deps evmstate
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) "tools/evmstate/$@.nim"
# builds txparse tool
txparse: | build deps
$(ENV_SCRIPT) nim c $(NIM_PARAMS) "tools/txparse/$@.nim"
# usual cleaning
clean: | clean-common
rm -rf build/{nimbus,nimbus_execution_client,nimbus_portal_client,fluffy,portal_bridge,libverifproxy,nimbus_verified_proxy,$(TOOLS_CSV),$(PORTAL_TOOLS_CSV),all_tests,test_kvstore_rocksdb,test_rpc,all_portal_tests,all_history_network_custom_chain_tests,test_portal_testnet,utp_test_app,utp_test,*.dSYM}
rm -rf tools/t8n/{t8n,t8n_test}
rm -rf tools/evmstate/{evmstate,evmstate_test}
rm -rf tests/fixtures/eest
# Note about building Nimbus as a library:
#
# There were `wrappers`, `wrappers-static`, `libnimbus.so` and `libnimbus.a`
# target scripts here, and C and Go examples for calling the Nimbus library in
# directory `wrappers/`. They have been removed because they only wrapped
# Whisper protocol support, which has been removed as it is obsolete.
#
# This note is kept so that anyone wanting to build Nimbus as a library or call
# from C or Go will know it has been done before. The previous working version
# can be found in Git history. Look for the `nimbus-eth1` commit that adds
# this comment and removes `wrappers/*`.
dist-linux-amd64:
+ MAKE="$(MAKE)" \
scripts/make_dist.sh linux-amd64
dist-linux-arm64:
+ MAKE="$(MAKE)" \
scripts/make_dist.sh linux-arm64
dist-windows-amd64:
+ MAKE="$(MAKE)" \
scripts/make_dist.sh windows-amd64
dist-macos-arm64:
+ MAKE="$(MAKE)" \
scripts/make_dist.sh macos-arm64
dist:
+ $(MAKE) --no-print-directory dist-linux-amd64
+ $(MAKE) --no-print-directory dist-linux-arm64
+ $(MAKE) --no-print-directory dist-windows-amd64
+ $(MAKE) --no-print-directory dist-macos-arm64
endif # "variables.mk" was not included