blob: 47c4d75ca71186e3e2329f2615411b17e531440d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/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
|