macos: separate building orca core from samples

This commit is contained in:
Reuben Dunnington 2023-09-24 23:15:44 -04:00
parent aac74b0533
commit 9448104f41
Signed by: rdunnington
GPG Key ID: 3D57C8938EA08E90
5 changed files with 35 additions and 5 deletions

View File

@ -15,6 +15,7 @@ fi
ORCA_DIR=../..
STDLIB_DIR=$ORCA_DIR/src/libc-shim
# common flags to build wasm modules
wasmFlags="--target=wasm32 \
--no-standard-libraries \
-mbulk-memory \
@ -26,6 +27,11 @@ wasmFlags="--target=wasm32 \
-I $ORCA_DIR/src \
-I $ORCA_DIR/src/ext"
clang $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c
# build orca core as wasm module
clang $wasmFlags -Wl,--relocatable -o ./liborca.a $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c
# build sample as wasm module and link it with the orca module
clang $wasmFlags -L . -lorca -o module.wasm src/main.c
# create app directory and copy files into it
orca bundle --orca-dir $ORCA_DIR --name Breakout --icon icon.png --resource-dir data module.wasm

View File

@ -15,6 +15,7 @@ fi
ORCA_DIR=../..
STDLIB_DIR=$ORCA_DIR/src/libc-shim
# common flags to build wasm modules
wasmFlags="--target=wasm32 \
--no-standard-libraries \
-mbulk-memory \
@ -26,6 +27,11 @@ wasmFlags="--target=wasm32 \
-I $ORCA_DIR/src \
-I $ORCA_DIR/src/ext"
clang $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c
# build orca core as wasm module
clang $wasmFlags -Wl,--relocatable -o ./liborca.a $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c
# build sample as wasm module and link it with the orca module
clang $wasmFlags -L . -lorca -o module.wasm src/main.c
# create app directory and copy files into it
orca bundle --orca-dir $ORCA_DIR --name Clock --icon icon.png --resource-dir data module.wasm

View File

@ -17,6 +17,7 @@ STDLIB_DIR=$ORCA_DIR/src/libc-shim
python3 ../../scripts/embed_text_files.py --prefix=glsl_ --output src/glsl_shaders.h src/shaders/*.glsl
# common flags to build wasm modules
wasmFlags="--target=wasm32 \
--no-standard-libraries \
-mbulk-memory \
@ -28,6 +29,11 @@ wasmFlags="--target=wasm32 \
-I $ORCA_DIR/src \
-I $ORCA_DIR/src/ext"
clang $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c
# build orca core as wasm module
clang $wasmFlags -Wl,--relocatable -o ./liborca.a $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c
# build sample as wasm module and link it with the orca module
clang $wasmFlags -L . -lorca -o module.wasm src/main.c
# create app directory and copy files into it
orca bundle --orca-dir $ORCA_DIR --name Fluid --icon icon.png module.wasm

View File

@ -15,6 +15,7 @@ fi
ORCA_DIR=../..
STDLIB_DIR=$ORCA_DIR/src/libc-shim
# common flags to build wasm modules
wasmFlags="--target=wasm32 \
--no-standard-libraries \
-mbulk-memory \
@ -26,6 +27,11 @@ wasmFlags="--target=wasm32 \
-I $ORCA_DIR/src \
-I $ORCA_DIR/src/ext"
clang $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c
# build orca core as wasm module
clang $wasmFlags -Wl,--relocatable -o ./liborca.a $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c
# build sample as wasm module and link it with the orca module
clang $wasmFlags -L . -lorca -o module.wasm src/main.c
# create app directory and copy files into it
orca bundle --orca-dir $ORCA_DIR --name Triangle module.wasm

View File

@ -15,6 +15,7 @@ fi
ORCA_DIR=../..
STDLIB_DIR=$ORCA_DIR/src/libc-shim
# common flags to build wasm modules
wasmFlags="--target=wasm32 \
--no-standard-libraries \
-mbulk-memory \
@ -26,6 +27,11 @@ wasmFlags="--target=wasm32 \
-I $ORCA_DIR/src \
-I $ORCA_DIR/src/ext"
clang $wasmFlags -o ./module.wasm $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c src/main.c
# build orca core as wasm module
clang $wasmFlags -Wl,--relocatable -o ./liborca.a $ORCA_DIR/src/orca.c $STDLIB_DIR/src/*.c
# build sample as wasm module and link it with the orca module
clang $wasmFlags -L . -lorca -o module.wasm src/main.c
# create app directory and copy files into it
orca bundle --orca-dir $ORCA_DIR --name UI --resource-dir data module.wasm