Update: make some linux specific changes

This commit is contained in:
Rodolfo Barcelli Jo 2026-01-22 20:50:56 +08:00
parent 3dddcd1ea0
commit 26127dc35b
2 changed files with 22 additions and 1 deletions

21
examples/example1/build.sh Executable file
View file

@ -0,0 +1,21 @@
#!/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

View file

@ -33,7 +33,7 @@ int main(void) {
printf("%llu\n", MinMemorySize);
#endif
#ifdef UNIX
#ifdef __unix__
printf("%lu\n", MinMemorySize);
#endif