#!/bin/sh FLAGS="-Wall -Wextra -g -pedantic" RAYLIB_FLAGS="-lraylib -lm -lpthread -lGL -ldl -lrt -lX11" RAYLIB_SRC="/usr/local/src/raylib/src" mkdir -p bin set -xe if ! [[ $1 = "web" ]]; then gcc -o bin/main main.c $DEBUG_FLAGS $RAYLIB_FLAGS else source emsdk_env.sh emcc -o bin/circle-thingy.html *.c \ -O2 -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 shell.html fi