fabapp/justfile
2023-10-30 14:02:11 +01:00

39 lines
889 B
Makefile

cpp_build_dir := justfile_directory() / "build"
alias b := build
alias r := run
alias t := test
alias fmt := format
pre-build:
git submodule update --init --recursive
raylib:
mkdir -p {{ cpp_build_dir }}
cmake -B {{ cpp_build_dir }} -S {{ justfile_directory() }}/3rd-party/raylib \
-DBUILD_EXAMPLES=OFF
cmake --build {{ cpp_build_dir }}
raygui:
tup
deps: pre-build raylib raygui
build:
zig build -Doptimize=Debug
# web-build: pre-build
# # zig build-lib src/main.zig -target wasm32-freestanding -dynamic -rdynamic
# zig build -Dtarget=wasm32-emscripten --sysroot /nix/store/lszbak7w3k1jmx3cm3qb2qzillsib71v-emscripten-3.1.24/bin/emcc
# # zig build -Dtarget=wasm32-emscripten
run:
nixGL zig build run -- {{ justfile_directory() }}/life.sqlite3
test:
zig build test
format:
fd -e zig -X zig fmt {}
fd -e nix -X nix fmt {}