diff options
Diffstat (limited to '.justfile')
| -rw-r--r-- | .justfile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/.justfile b/.justfile new file mode 100644 index 0000000..188e852 --- /dev/null +++ b/.justfile @@ -0,0 +1,35 @@ +src := "src/main.c3" +bin := "build/csh" + +default: + @just --list + +tangle: + emacs -Q --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "README.org")' + +run: tangle _prep + c3c compile-run {{src}} -o {{bin}} + +build: tangle _prep + c3c compile {{src}} -O0 -g -o {{bin}} + +release: tangle _prep + c3c compile {{src}} -O5 -o {{bin}} + +asan: tangle _prep + c3c compile-run {{src}} -O0 -g --sanitize=address -o {{bin}} + +tsan: tangle _prep + c3c compile-run {{src}} -O0 -g --sanitize=thread -o {{bin}} + +example name: tangle _prep + c3c compile-run src/{{name}}.c3 -o build/{{name}} + +valgrind: build + valgrind --leak-check=full --error-exitcode=1 ./{{bin}} + +clean: + rm -rf build src + +_prep: + @mkdir -p build |
