Add raylib 5.5 to our codebase and statically link with it
This way you won't need to install raylib as a dependency in order to use it. You'll still need its dependencies, like glfw, but this should remove one layer of indirection.
This commit is contained in:
30
build.sh
30
build.sh
@@ -3,24 +3,24 @@
|
||||
set -xe
|
||||
|
||||
OUT="cw_tree.out"
|
||||
GFLAGS="-Wall -Wextra -Wswitch-enum -std=c++17"
|
||||
GFLAGS="-Wall -Wextra -Wswitch-enum -std=c++17 -Iraylib-5.5_linux_amd64/include"
|
||||
LIBS="-Lraylib-5.5_linux_amd64/lib -l:libraylib.a" # link statically with raylib
|
||||
VARFLAGS="-DTHREAD_PAUSE_MS=1000 -DTHREAD_GENERAL_MS=1"
|
||||
|
||||
DFLAGS="-ggdb -fsanitize=address -fsanitize=undefined"
|
||||
RFLAGS="-O2"
|
||||
VARFLAGS="-DTHREAD_PAUSE_MS=1000 -DTHREAD_GENERAL_MS=1"
|
||||
CFLAGS="$GFLAGS $VARFLAGS $DFLAGS"
|
||||
LIBS="-lraylib -lm"
|
||||
|
||||
build() {
|
||||
c++ $CFLAGS -o $OUT src/node.cpp src/state.cpp src/worker.cpp src/main.cpp $LIBS
|
||||
}
|
||||
|
||||
if [ "$1" = "run" ]
|
||||
then
|
||||
build && ./$OUT
|
||||
elif [ "$1" = "release" ]
|
||||
if [ "$1" = "release" ]
|
||||
then
|
||||
CFLAGS="$GFLAGS $VARFLAGS $RFLAGS"
|
||||
build;
|
||||
else
|
||||
build;
|
||||
shift 1
|
||||
elif [ "$1" = "debug" ]
|
||||
then
|
||||
shift 1
|
||||
fi
|
||||
|
||||
c++ $CFLAGS -o $OUT src/node.cpp src/state.cpp src/worker.cpp src/main.cpp $LIBS
|
||||
if [ "$1" = "run" ]
|
||||
then
|
||||
./$OUT
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user