summaryrefslogtreecommitdiff
path: root/code/build.sh
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-10-02 12:42:29 +0200
committerRaymaekers Luca <luca@spacehb.net>2025-10-02 12:42:29 +0200
commit02841e3c67c92006f9fe08efcda0d15f3d7283c5 (patch)
treec3b79a2c7e14473e1e9244df1af318511ab86ca1 /code/build.sh
parentaadff4d1cf17cc23f6f38ab0da51baabfeb9f9d1 (diff)
checkpoint
Diffstat (limited to 'code/build.sh')
-rwxr-xr-xcode/build.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/code/build.sh b/code/build.sh
index be1cbc2..96b9516 100755
--- a/code/build.sh
+++ b/code/build.sh
@@ -14,8 +14,6 @@ fi
CompilerFlags="
-fdiagnostics-absolute-paths
---target=wasm32
--nostdlib
"
WarningFlags="
@@ -27,6 +25,7 @@ WarningFlags="
-Wno-pointer-arith
-Wno-unused-parameter
-Wno-unused-function
+-Wno-null-dereference
"
LinkerFlags="
@@ -52,9 +51,25 @@ fi
printf 'game.c\n'
clang \
$CompilerFlags \
+ -nostdlib \
+ --target=wasm32 \
$WarningFlags \
$LinkerFlags \
-o ../build/game.wasm \
game.c
printf 'index.html platform.js\n'
-cp index.html platform.js ../build
+ln -f index.html platform.js ../build
+
+if true
+then
+ cd ../ws
+ printf 'ws.c\n'
+ clang \
+ -I./libs/wsServer/include -I./libs/wsServer/src \
+ $CompilerFlags \
+ $WarningFlags \
+ -o ../build/ws \
+ ws.c
+fi
+
+printf '%s\n' "update" | websocat 'ws://localhost:1234/' \ No newline at end of file