progressbar/makefilebutbetter.sh

15 lines
837 B
Bash
Raw Permalink Normal View History

2024-07-13 21:31:16 +02:00
#!/usr/bin/env bash
if [ $# -eq 0 ]; then
echo "compiling for linux - assuming you have raylib installed"
gcc -o ./compile/linux game.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
else
echo "im too lazy to check what you passed as the argument - assuming you want to compile for web"
echo "you need emscripten, and raylib compiled with it, firgure it out yourself idfk"
emcc -o ./compile/web/index.html game.c -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result -Os -I. -I \
./raylib/src/ -I ./raylib/src/external/ -L. -L\
./raylib/src -s USE_GLFW=3 -s ASYNCIFY -s TOTAL_MEMORY=67108864\
-s FORCE_FILESYSTEM=1 --shell-file ./emscripten.html ./raylib/src/web/libraylib.a\
-DPLATFORM_WEB -s 'EXPORTED_FUNCTIONS=["_free","_malloc","_main"]'\
-s EXPORTED_RUNTIME_METHODS=ccall
fi