22 lines
467 B
Bash
Executable file
22 lines
467 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ ! -d "./build" ]]; then
|
|
mkdir build
|
|
fi
|
|
|
|
if [[ $1 == "--setup" ]]; then
|
|
git submodule update --init
|
|
pushd "./external/raylib/"
|
|
cmake -S . -B build
|
|
cmake --build build
|
|
popd
|
|
fi
|
|
|
|
pushd "./build"
|
|
gcc -g "../example1.c" -o "example1" -I"../external/raylib/build/raylib/include/" -L"../external/raylib/build/raylib/" -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
|
|
|
|
if [[ $1 == "--run" ]] && [[ $? == 0 ]]; then
|
|
./example1
|
|
fi
|
|
popd
|