summaryrefslogtreecommitdiff
path: root/circle-thingy/build.sh
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-04-12 23:33:50 +0300
committerkartofen <mladenovnasko0@gmail.com>2023-04-12 23:33:50 +0300
commit8270ca448dd86517468872d9fc26f0f5d402864a (patch)
treed55590d4e1812a0d31e2fdb69668b78352eab950 /circle-thingy/build.sh
cirlce-thingy doneHEADmaster
Diffstat (limited to 'circle-thingy/build.sh')
-rwxr-xr-xcircle-thingy/build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/circle-thingy/build.sh b/circle-thingy/build.sh
new file mode 100755
index 0000000..47c4d75
--- /dev/null
+++ b/circle-thingy/build.sh
@@ -0,0 +1,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