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: pre-build
|
|
|
|
mkdir -p {{ cpp_build_dir }}
|
|
|
|
cmake -B {{ cpp_build_dir }} -S {{ justfile_directory() }}/3rd-party/raylib \
|
|
|
|
-DUSE_WAYLAND=ON -DBUILD_EXAMPLES=OFF
|
|
|
|
cmake --build {{ cpp_build_dir }}
|
|
|
|
|
|
|
|
raygui: raylib
|
|
|
|
tup
|
2023-10-04 14:20:49 +02:00
|
|
|
|
2023-10-15 23:05:24 +02:00
|
|
|
build: raylib raygui
|
|
|
|
zig build -Doptimize=Debug
|
|
|
|
# zig build -Doptimize=Debug -Dtarget=x86_64-linux-gnu.2.30
|
|
|
|
# zig build -Doptimize=Debug -Dtarget=native-native-musl #--search-prefix /nix/store/n12a68qch9s85k6ni4m4r4xxr8lwys1i-sqlite-3.41.2/lib
|
|
|
|
|
|
|
|
web-build: pre-build
|
2023-10-13 18:16:41 +02:00
|
|
|
# zig build-lib src/main.zig -target wasm32-freestanding -dynamic -rdynamic
|
2023-10-15 23:05:24 +02:00
|
|
|
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-06 14:40:56 +02:00
|
|
|
run:
|
|
|
|
nixGL zig build run
|
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 {}
|
2023-10-04 14:20:49 +02:00
|
|
|
|
2023-10-15 23:05:24 +02:00
|
|
|
# update-deps:
|
|
|
|
# # We cannot easily add header-only C library with package manager
|
|
|
|
# curl https://raw.githubusercontent.com/raysan5/raygui/master/src/raygui.h --remote-name --output-dir 3rd-party/
|
|
|
|
# curl https://raw.githubusercontent.com/raysan5/raygui/master/examples/custom_file_dialog/gui_window_file_dialog.h --remote-name --output-dir 3rd-party/
|
|
|
|
|
|
|
|
envrc:
|
|
|
|
echo "use flake ."
|
|
|
|
echo "export CMAKE_GENERATOR=Ninja"
|