From b58937e1f75a9c632136f1aa8f321fd78a62c862 Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sat, 13 Dec 2025 11:21:14 +0100 Subject: [PATCH] Create Makefile --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7c08428 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +MKFILE_PATH := $(patsubst %/,%, $(dir $(realpath $(firstword $(MAKEFILE_LIST))))) +DATE := $(shell date +%Y-%m-%d) + +.DEFAULT_GOAL := help + +check_and_install_rust: + @if command -v rustc >/dev/null 2>&1; then \ + echo "Rust is already installed"; \ + else \ + echo "Rust is not installed"; \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \ + export PATH="$HOME/.cargo/bin:$PATH"; \ + echo "Rust has been installed"; \ + fi + +build: check_and_install_rust + cargo build + +build-release: check_and_install_rust + cargo build --release + +clean: + cargo clean + +update: + cargo update + +test: + cargo test --test binary_integration_test -- --nocapture + +help: + @echo "build : Build debug binary" + @echo "build-release : Build release binary" + @echo "clean : Clean cargo" + @echo "update : Update cargo packages" + @echo "test : Startet cargo test mit println Ausgabe" \ No newline at end of file -- 2.43.0