From 071e8560d429e20ab2f2b643064632a336f412db Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Fri, 30 Jun 2023 17:14:10 -0500 Subject: [PATCH] A little build script cleanup --- .gitignore | 6 +++++- milepost | 2 +- samples/pong/build.sh | 24 +++++++++++++++--------- samples/pong/src/main.c | 9 +++------ 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index ae6e1b4..695d9d9 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,8 @@ Debug/* src/bindgen_core_api.c src/bindgen_gles_api.c -*bind_gen.c \ No newline at end of file +sdk/io_stubs.c +sdk/orca_surface.c +*bind_gen.c + +.vscode/settings.json diff --git a/milepost b/milepost index 21aa1be..23984e8 160000 --- a/milepost +++ b/milepost @@ -1 +1 @@ -Subproject commit 21aa1bef68c3590c1898a539da4c38e3854a5a9d +Subproject commit 23984e8370816c3f324af6ae58172c7be9ada32f diff --git a/samples/pong/build.sh b/samples/pong/build.sh index 1f874cc..cf8ee84 100755 --- a/samples/pong/build.sh +++ b/samples/pong/build.sh @@ -11,16 +11,22 @@ else CLANG=clang fi +STDLIB_DIR=../../cstdlib +ORCA_SDK_DIR=../../sdk +MILEPOST_DIR=../../milepost + wasmFlags="--target=wasm32 \ - --no-standard-libraries \ - -fno-builtin \ - -Wl,--no-entry \ - -Wl,--export-dynamic \ - -g \ - -O2 \ - -mbulk-memory \ - -D__ORCA__ \ - -isystem ../../cstdlib/include -I ../../sdk -I../../milepost/ext -I ../../milepost -I ../../milepost/src -I ../../milepost/src/util -I ../../milepost/src/platform -I../.." + --no-standard-libraries \ + -fno-builtin \ + -Wl,--no-entry \ + -Wl,--export-dynamic \ + -g \ + -O2 \ + -mbulk-memory \ + -D__ORCA__ \ + -I $STDLIB_DIR/include \ + -I $ORCA_SDK_DIR \ + -I $MILEPOST_DIR/ext -I $MILEPOST_DIR -I $MILEPOST_DIR/src -I $MILEPOST_DIR/src/util -I $MILEPOST_DIR/src/platform" $CLANG $wasmFlags -o ./module.wasm ../../sdk/orca.c ../../cstdlib/src/*.c src/main.c diff --git a/samples/pong/src/main.c b/samples/pong/src/main.c index 6f78c3f..3de819b 100644 --- a/samples/pong/src/main.c +++ b/samples/pong/src/main.c @@ -7,16 +7,13 @@ * *****************************************************************/ -#include"keys.h" -#include"graphics.h" +#include +#include -#include"orca.h" +#include #define M_PI 3.14159265358979323846 -extern float cosf(float x); -extern float sinf(float x); - const mg_color paddleColor = {1, 0, 0, 1}; mp_rect paddle = {200, 40, 200, 40};