mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
Merge branch 'buildsys' into devel
This commit is contained in:
commit
449a8f1734
14
Makefile
14
Makefile
@ -42,13 +42,13 @@ update: | update-common
|
||||
$(MAKE) nimbus.nims
|
||||
|
||||
# builds the tools, wherever they are
|
||||
$(TOOLS): | build deps nat-libs
|
||||
$(TOOLS): | build deps
|
||||
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) -o:build/$@ "$${TOOL_DIR}/$@.nim"
|
||||
|
||||
# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
|
||||
nimbus: | build deps nat-libs
|
||||
nimbus: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim nimbus $(NIM_PARAMS) nimbus.nims
|
||||
|
||||
@ -57,7 +57,7 @@ nimbus.nims:
|
||||
ln -s nimbus.nimble $@
|
||||
|
||||
# builds and runs the test suite
|
||||
test: | build deps nat-libs
|
||||
test: | build deps
|
||||
$(ENV_SCRIPT) nim test $(NIM_PARAMS) nimbus.nims
|
||||
|
||||
# primitive reproducibility test
|
||||
@ -74,24 +74,24 @@ test-reproducibility:
|
||||
clean: | clean-common
|
||||
rm -rf build/{nimbus,$(TOOLS_CSV),all_tests,test_rpc,*_wrapper_test}
|
||||
|
||||
libnimbus.so: | build deps nat-libs
|
||||
libnimbus.so: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim c --app:lib --noMain --nimcache:nimcache/libnimbus $(NIM_PARAMS) -o:build/$@.0 wrappers/libnimbus.nim && \
|
||||
rm -f build/$@ && \
|
||||
ln -s $@.0 build/$@
|
||||
|
||||
wrappers: | build deps nat-libs libnimbus.so go-checks
|
||||
wrappers: | build deps libnimbus.so go-checks
|
||||
echo -e $(BUILD_MSG) "build/C_wrapper_example" && \
|
||||
$(CC) wrappers/wrapper_example.c -Wl,-rpath,'$$ORIGIN' -Lbuild -lnimbus -lm -g -o build/C_wrapper_example
|
||||
echo -e $(BUILD_MSG) "build/go_wrapper_example" && \
|
||||
go build -linkshared -o build/go_wrapper_example wrappers/wrapper_example.go
|
||||
|
||||
libnimbus.a: | build deps nat-libs
|
||||
libnimbus.a: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
rm -f build/$@ && \
|
||||
$(ENV_SCRIPT) nim c --app:staticlib --noMain --nimcache:nimcache/libnimbus $(NIM_PARAMS) -o:build/$@ wrappers/libnimbus.nim
|
||||
|
||||
wrappers-static: | build deps nat-libs libnimbus.a go-checks
|
||||
wrappers-static: | build deps libnimbus.a go-checks
|
||||
echo -e $(BUILD_MSG) "build/C_wrapper_example_static" && \
|
||||
$(CC) wrappers/wrapper_example.c -static -pthread -Lbuild -lnimbus -lm -ldl -g -o build/C_wrapper_example_static
|
||||
echo -e $(BUILD_MSG) "build/go_wrapper_example_static" && \
|
||||
|
2
vendor/nimbus-build-system
vendored
2
vendor/nimbus-build-system
vendored
@ -1 +1 @@
|
||||
Subproject commit 705c897ee79f80ffc81aae9f6cb42bdc9a0a78c8
|
||||
Subproject commit 178ded44a307a479e77e4dafacddc594fff8ba4c
|
Loading…
x
Reference in New Issue
Block a user