From 8270ca448dd86517468872d9fc26f0f5d402864a Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 12 Apr 2023 23:33:50 +0300 Subject: cirlce-thingy done --- circle-thingy/build.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 circle-thingy/build.sh (limited to 'circle-thingy/build.sh') 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 -- cgit v1.2.3