2025-12-19 13:18:16 +01:00
|
|
|
default: build
|
2025-12-17 12:15:17 +01:00
|
|
|
|
2026-06-05 11:26:27 -04:00
|
|
|
# Inside `nix develop` / `ws develop logos-blockchain-module` the module-builder
|
|
|
|
|
# provides LOGOS_CPP_SDK_ROOT and LOGOS_MODULE_BUILDER_ROOT — CMake picks them
|
|
|
|
|
# up automatically via the logos_module() macro, no explicit -D flags needed.
|
2025-12-17 12:15:17 +01:00
|
|
|
configure:
|
2026-06-18 14:48:16 +00:00
|
|
|
cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
2025-12-17 12:15:17 +01:00
|
|
|
|
2026-01-30 19:21:23 +01:00
|
|
|
build: configure
|
2026-06-05 11:26:27 -04:00
|
|
|
cmake --build build --parallel --target liblogos_blockchain_module_module_plugin
|
2025-12-17 12:15:17 +01:00
|
|
|
|
|
|
|
|
clean:
|
2026-02-16 16:56:13 +01:00
|
|
|
rm -rf build result
|
2025-12-19 13:18:16 +01:00
|
|
|
|
2026-02-16 16:56:13 +01:00
|
|
|
rebuild: clean build
|
2025-12-19 13:18:16 +01:00
|
|
|
|
2025-12-20 09:08:46 +01:00
|
|
|
nix:
|
2026-01-30 19:21:23 +01:00
|
|
|
nix develop
|
2025-12-20 09:33:50 +01:00
|
|
|
|
2026-06-18 14:48:16 +00:00
|
|
|
# Launch CLion inside the Nix dev shell so it inherits required variables and fully integrates with Nix.
|
|
|
|
|
clion:
|
|
|
|
|
nix develop -c "$HOME/.local/share/JetBrains/Toolbox/apps/clion/bin/clion.sh" . >/dev/null 2>&1 &
|
|
|
|
|
|
2026-02-16 16:14:54 +01:00
|
|
|
prettify:
|
|
|
|
|
nix shell nixpkgs#clang-tools -c clang-format -i src/**.cpp src/**.h
|
|
|
|
|
|
2026-06-18 14:48:16 +00:00
|
|
|
lint: configure
|
|
|
|
|
nix shell nixpkgs#clang-tools --command clang-tidy \
|
|
|
|
|
-p build \
|
|
|
|
|
--header-filter='src/.*' \
|
|
|
|
|
--extra-arg-before=--driver-mode=g++ \
|
|
|
|
|
--extra-arg=-I"$LOGOS_EXT_ROOT_LOGOS_BLOCKCHAIN/include" \
|
|
|
|
|
src/logos_blockchain_module.cpp
|
|
|
|
|
|
2026-01-20 16:09:40 +01:00
|
|
|
unicode-logs file:
|
2026-01-30 19:21:23 +01:00
|
|
|
perl -pe 's/\\u([0-9A-Fa-f]{4})/chr(hex($1))/ge' {{file}} | less -R
|