From 6cb596cafa71b8c8d3521deb0521c0969942fb3a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 2 Jun 2026 00:25:05 +0530 Subject: Just the tip --- justfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 justfile (limited to 'justfile') diff --git a/justfile b/justfile new file mode 100644 index 0000000..6c0f728 --- /dev/null +++ b/justfile @@ -0,0 +1,21 @@ +set export + +CC := "gcc" +CFLAGS := f"-std=c11 -O2 \ +-Wall -Wextra -Wshadow -Wformat=2 -fsanitize=address,undefined \ +{{shell('pkg-config --cflags --libs sqlite3')}}" +OUTDIR := "build" + +build: compile-flags + mkdir -p "{{OUTDIR}}" + {{CC}} {{CFLAGS}} src/*.c -o "{{OUTDIR}}/sqlheavy" + +run: build + "./{{OUTDIR}}/sqlheavy" + +@compile-flags: + echo '{{CFLAGS}}' | tr ' ' '\n' > ./compile_flags.txt + +format: + find src/ -iname '*.h' -o -iname '*.c' | xargs clang-format -i + -- cgit v1.3.1