mirror of https://github.com/waku-org/nwaku.git
fix/makefile (#194)
* rename make targets * rename * fixes * fix * fix * added example 2 * fix * fix * silly me
This commit is contained in:
parent
a975bf6d70
commit
065016393a
35
Makefile
35
Makefile
|
@ -21,10 +21,11 @@ DOCKER_IMAGE_NIM_PARAMS ?= -d:chronicles_colors:none -d:insecure
|
||||||
all \
|
all \
|
||||||
deps \
|
deps \
|
||||||
update \
|
update \
|
||||||
wakusim \
|
sim1 \
|
||||||
wakunode \
|
wakunode1 \
|
||||||
wakunode2 \
|
wakunode2 \
|
||||||
wakuexample \
|
example1 \
|
||||||
|
example2 \
|
||||||
test \
|
test \
|
||||||
clean \
|
clean \
|
||||||
libbacktrace
|
libbacktrace
|
||||||
|
@ -45,7 +46,7 @@ GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
|
||||||
else # "variables.mk" was included. Business as usual until the end of this file.
|
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 '.'
|
# default target, because it's the first one that doesn't start with '.'
|
||||||
all: | wakunode wakusim wakuexample wakunode2 wakusim2 wakuexample2
|
all: | wakunode1 sim1 example1 wakunode2 sim2 example2
|
||||||
|
|
||||||
# must be included after the default target
|
# must be included after the default target
|
||||||
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
||||||
|
@ -68,25 +69,29 @@ update: | update-common
|
||||||
$(MAKE) waku.nims $(HANDLE_OUTPUT)
|
$(MAKE) waku.nims $(HANDLE_OUTPUT)
|
||||||
|
|
||||||
# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
|
# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
|
||||||
wakunode: | build deps
|
wakunode1: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakunode $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim wakunode1 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
wakusim: | build deps wakunode
|
sim1: | build deps wakunode1
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakusim $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim sim1 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
wakuexample: | build deps
|
example1: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakuexample $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim example1 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
|
example2: | build deps
|
||||||
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
|
$(ENV_SCRIPT) nim example2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
wakunode2: | build deps
|
wakunode2: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakunode2 $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim wakunode2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
wakusim2: | build deps wakunode2
|
sim2: | build deps wakunode2
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakusim2 $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim sim2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
scripts2: | build deps wakunode2
|
scripts2: | build deps wakunode2
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
|
@ -100,9 +105,9 @@ test2:
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim test2 $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim test2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
wakuexample2:
|
example2:
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakuexample2 $(NIM_PARAMS) waku.nims
|
$(ENV_SCRIPT) nim example2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
chat2:
|
chat2:
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
|
@ -117,7 +122,7 @@ libbacktrace:
|
||||||
+ $(MAKE) -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
+ $(MAKE) -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
||||||
|
|
||||||
# build a docker image for the fleet
|
# build a docker image for the fleet
|
||||||
docker-image: MAKE_TARGET ?= wakunode
|
docker-image: MAKE_TARGET ?= wakunode1
|
||||||
docker-image: DOCKER_IMAGE_TAG ?= $(MAKE_TARGET)
|
docker-image: DOCKER_IMAGE_TAG ?= $(MAKE_TARGET)
|
||||||
docker-image: DOCKER_IMAGE_NAME ?= statusteam/nim-waku:$(DOCKER_IMAGE_TAG)
|
docker-image: DOCKER_IMAGE_NAME ?= statusteam/nim-waku:$(DOCKER_IMAGE_TAG)
|
||||||
docker-image:
|
docker-image:
|
||||||
|
|
10
waku.nimble
10
waku.nimble
|
@ -47,14 +47,14 @@ task test, "Run waku v1 tests":
|
||||||
task test2, "Run waku v2 tests":
|
task test2, "Run waku v2 tests":
|
||||||
test "all_tests_v2"
|
test "all_tests_v2"
|
||||||
|
|
||||||
task wakunode, "Build Waku v1 cli node":
|
task wakunode1, "Build Waku v1 cli node":
|
||||||
buildBinary "wakunode", "waku/node/v1/", "-d:chronicles_log_level=TRACE"
|
buildBinary "wakunode", "waku/node/v1/", "-d:chronicles_log_level=TRACE"
|
||||||
|
|
||||||
task wakusim, "Build Waku v1 simulation tools":
|
task sim1, "Build Waku v1 simulation tools":
|
||||||
buildBinary "quicksim", "waku/node/v1/", "-d:chronicles_log_level=INFO"
|
buildBinary "quicksim", "waku/node/v1/", "-d:chronicles_log_level=INFO"
|
||||||
buildBinary "start_network", "waku/node/v1/", "-d:chronicles_log_level=DEBUG"
|
buildBinary "start_network", "waku/node/v1/", "-d:chronicles_log_level=DEBUG"
|
||||||
|
|
||||||
task wakuexample, "Build Waku v1 example":
|
task example1, "Build Waku v1 example":
|
||||||
buildBinary "example", "examples/v1/", "-d:chronicles_log_level=DEBUG"
|
buildBinary "example", "examples/v1/", "-d:chronicles_log_level=DEBUG"
|
||||||
|
|
||||||
# TODO Also build Waku store and filter protocols here
|
# TODO Also build Waku store and filter protocols here
|
||||||
|
@ -64,7 +64,7 @@ task protocol2, "Build the experimental Waku protocol":
|
||||||
task wakunode2, "Build Experimental Waku cli":
|
task wakunode2, "Build Experimental Waku cli":
|
||||||
buildBinary "wakunode2", "waku/node/v2/", "-d:chronicles_log_level=TRACE"
|
buildBinary "wakunode2", "waku/node/v2/", "-d:chronicles_log_level=TRACE"
|
||||||
|
|
||||||
task wakusim2, "Build Experimental Waku simulation tools":
|
task sim2, "Build Experimental Waku simulation tools":
|
||||||
buildBinary "quicksim2", "waku/node/v2/", "-d:chronicles_log_level=DEBUG"
|
buildBinary "quicksim2", "waku/node/v2/", "-d:chronicles_log_level=DEBUG"
|
||||||
buildBinary "start_network2", "waku/node/v2/", "-d:chronicles_log_level=TRACE"
|
buildBinary "start_network2", "waku/node/v2/", "-d:chronicles_log_level=TRACE"
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ task scripts2, "Build Waku v2 scripts":
|
||||||
buildBinary "rpc_subscribe", "waku/node/v2/rpc/", "-d:chronicles_log_level=DEBUG"
|
buildBinary "rpc_subscribe", "waku/node/v2/rpc/", "-d:chronicles_log_level=DEBUG"
|
||||||
buildBinary "rpc_query", "waku/node/v2/rpc/", "-d:chronicles_log_level=DEBUG"
|
buildBinary "rpc_query", "waku/node/v2/rpc/", "-d:chronicles_log_level=DEBUG"
|
||||||
|
|
||||||
task wakuexample2, "Build example Waku usage":
|
task example2, "Build example Waku usage":
|
||||||
let name = "basic2"
|
let name = "basic2"
|
||||||
buildBinary name, "examples/v2/", "-d:chronicles_log_level=DEBUG"
|
buildBinary name, "examples/v2/", "-d:chronicles_log_level=DEBUG"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue