#!/bin/sh cd ${0%/*} # go to project root FLAGS="-Wall -Wextra -g -pedantic" RAYLIB_FLAGS="-lraylib -lm -lpthread -lGL -ldl -lrt -lX11" RAYLIB_SRC="/usr/local/src/raylib/src" set -xe if ! [[ $1 == "web" ]] &> /dev/null; then gcc -o bin/main src/main.c $FLAGS $RAYLIB_FLAGS else source emsdk_env.sh emcc -o bin/proc-gen.html src/main.c \ $FLAGS -DPLATFORM_WEB -DRAYLIB_SRC="\"$RAYLIB_SRC/raylib.h\"" \ $RAYLIB_SRC/libraylib.a \ -I$RAYLIB_SRC/raylib.h \ -s USE_GLFW=3 -s ASYNCIFY \ --shell-file src/shell.html fi