fabapp/justfile

39 lines
889 B
Makefile
Raw Normal View History

2023-10-15 23:05:24 +02:00
cpp_build_dir := justfile_directory() / "build"
2023-10-06 14:40:56 +02:00
alias b := build
alias r := run
alias t := test
alias fmt := format
2023-10-15 23:05:24 +02:00
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
2023-10-04 14:20:49 +02:00
build:
2023-10-15 23:05:24 +02:00
zig build -Doptimize=Debug
2023-10-04 14:20:49 +02:00
2023-10-26 14:12:24 +02:00
# 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
2023-10-04 14:20:49 +02:00
2023-10-15 23:05:24 +02:00
run:
2023-10-30 14:02:11 +01:00
nixGL zig build run -- {{ justfile_directory() }}/life.sqlite3
2023-10-04 14:20:49 +02:00
test:
2023-10-06 14:40:56 +02:00
zig build test
2023-10-04 14:20:49 +02:00
2023-10-06 14:40:56 +02:00
format:
fd -e zig -X zig fmt {}
fd -e nix -X nix fmt {}