win32: separate building orca core from samples
This commit is contained in:
parent
4f0738fe64
commit
aac74b0533
|
@ -14,6 +14,7 @@ build
|
|||
*.wasm
|
||||
*.app
|
||||
*.dylib
|
||||
*.a
|
||||
|
||||
Debug/*
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ if exist "..\..\scripts\sample_build_check.py" (
|
|||
set ORCA_DIR=..\..
|
||||
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
|
||||
|
||||
:: compile wasm module
|
||||
:: common flags to build wasm modules
|
||||
set wasmFlags=--target=wasm32^
|
||||
--no-standard-libraries ^
|
||||
-mbulk-memory ^
|
||||
|
@ -27,7 +27,13 @@ set 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
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
:: build orca core as wasm module
|
||||
clang %wasmFlags% -Wl,--relocatable -o .\liborca.a %ORCA_DIR%\src\orca.c %ORCA_DIR%\src\libc-shim\src\*.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: build sample as wasm module and link it with the orca module
|
||||
clang %wasmFlags% -L . -lorca -o module.wasm src/main.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: create app directory and copy files into it
|
||||
orca bundle --orca-dir %ORCA_DIR% --name Breakout --icon icon.png --resource-dir data module.wasm
|
||||
|
|
|
@ -15,7 +15,7 @@ if exist "..\..\scripts\sample_build_check.py" (
|
|||
set ORCA_DIR=..\..
|
||||
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
|
||||
|
||||
:: compile wasm module
|
||||
:: common flags to build wasm modules
|
||||
set wasmFlags=--target=wasm32^
|
||||
--no-standard-libraries ^
|
||||
-mbulk-memory ^
|
||||
|
@ -27,7 +27,13 @@ set 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
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
:: build orca core as wasm module
|
||||
clang %wasmFlags% -Wl,--relocatable -o .\liborca.a %ORCA_DIR%\src\orca.c %ORCA_DIR%\src\libc-shim\src\*.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: build sample as wasm module and link it with the orca module
|
||||
clang %wasmFlags% -L . -lorca -o module.wasm src/main.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: create app directory and copy files into it
|
||||
orca bundle --orca-dir %ORCA_DIR% --name Clock --icon icon.png --resource-dir data module.wasm
|
||||
|
|
|
@ -15,7 +15,7 @@ if exist "..\..\scripts\sample_build_check.py" (
|
|||
set ORCA_DIR=..\..
|
||||
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
|
||||
|
||||
:: compile wasm module
|
||||
:: common flags to build wasm modules
|
||||
set wasmFlags=--target=wasm32^
|
||||
--no-standard-libraries ^
|
||||
-mbulk-memory ^
|
||||
|
@ -27,6 +27,10 @@ set wasmFlags=--target=wasm32^
|
|||
-I%ORCA_DIR%\src ^
|
||||
-I%ORCA_DIR%\src\ext
|
||||
|
||||
:: build orca core as wasm module
|
||||
clang %wasmFlags% -Wl,--relocatable -o .\liborca.a %ORCA_DIR%\src\orca.c %ORCA_DIR%\src\libc-shim\src\*.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
set shaders=src/shaders/advect.glsl^
|
||||
src/shaders/blit_div_fragment.glsl^
|
||||
src/shaders/blit_div_vertex.glsl^
|
||||
|
@ -45,7 +49,9 @@ set shaders=src/shaders/advect.glsl^
|
|||
call python ../../scripts/embed_text_files.py --prefix=glsl_ --output src/glsl_shaders.h %shaders%
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
|
||||
clang %wasmFlags% -o .\module.wasm %ORCA_DIR%\src\orca.c %STDLIB_DIR%\src\*.c src\main.c
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
:: build sample as wasm module and link it with the orca module
|
||||
clang %wasmFlags% -L . -lorca -o .\module.wasm src\main.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: create app directory and copy files into it
|
||||
orca bundle --orca-dir %ORCA_DIR% --name Fluid --icon icon.png module.wasm
|
|
@ -15,7 +15,7 @@ if exist "..\..\scripts\sample_build_check.py" (
|
|||
set ORCA_DIR=..\..
|
||||
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
|
||||
|
||||
:: compile wasm module
|
||||
:: common flags to build wasm modules
|
||||
set wasmFlags=--target=wasm32^
|
||||
--no-standard-libraries ^
|
||||
-mbulk-memory ^
|
||||
|
@ -27,7 +27,13 @@ set 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
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
:: build orca core as wasm module
|
||||
clang %wasmFlags% -Wl,--relocatable -o .\liborca.a %ORCA_DIR%\src\orca.c %ORCA_DIR%\src\libc-shim\src\*.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
orca bundle --orca-dir %ORCA_DIR% --name Triangle module.wasm
|
||||
:: build sample as wasm module and link it with the orca module
|
||||
clang %wasmFlags% -L . -lorca -o module.wasm src/main.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: create app directory and copy files into it
|
||||
orca bundle --orca-dir %ORCA_DIR% --name Triangle --icon icon.png module.wasm
|
||||
|
|
|
@ -15,7 +15,7 @@ if exist "..\..\scripts\sample_build_check.py" (
|
|||
set ORCA_DIR=..\..
|
||||
set STDLIB_DIR=%ORCA_DIR%\src\libc-shim
|
||||
|
||||
:: compile wasm module
|
||||
:: common flags to build wasm modules
|
||||
set wasmFlags=--target=wasm32^
|
||||
--no-standard-libraries ^
|
||||
-mbulk-memory ^
|
||||
|
@ -27,7 +27,13 @@ set 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
|
||||
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
|
||||
:: build orca core as wasm module
|
||||
clang %wasmFlags% -Wl,--relocatable -o .\liborca.a %ORCA_DIR%\src\orca.c %ORCA_DIR%\src\libc-shim\src\*.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: build sample as wasm module and link it with the orca module
|
||||
clang %wasmFlags% -L . -lorca -o .\module.wasm src\main.c
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
|
||||
:: create app directory and copy files into it
|
||||
orca bundle --orca-dir %ORCA_DIR% --name UI --resource-dir data module.wasm
|
||||
|
|
Loading…
Reference in New Issue