Update build script

This commit is contained in:
Miloslav Číž 2020-09-27 01:24:41 +02:00
parent 5a2dd45d62
commit 8bdf2825f3
1 changed files with 8 additions and 1 deletions

View File

@ -4,7 +4,7 @@
#!/bin/bash #!/bin/bash
if [ $# -ne 1 ]; then if [ $# -ne 1 ]; then
echo "need a parameter (sdl, pokitto, gb, ...)" echo "need a parameter (sdl, pokitto, gb, emscripten, ...)"
exit 0 exit 0
fi fi
@ -13,6 +13,7 @@ clear; clear;
if [ $1 == "sdl" ]; then if [ $1 == "sdl" ]; then
# PC SDL build, requires: # PC SDL build, requires:
# - g++
# - SDL2 (dev) package # - SDL2 (dev) package
g++ -x c -g -Wall -Wextra -fmax-errors=5 -pedantic -O3 -Wall -Wextra \ g++ -x c -g -Wall -Wextra -fmax-errors=5 -pedantic -O3 -Wall -Wextra \
@ -30,6 +31,12 @@ elif [ $1 == "pokitto" ]; then
make make
./PokittoEmu BUILD/firmware.bin ./PokittoEmu BUILD/firmware.bin
elif [ $1 == "emscripten" ]; then
# emscripten (browser Javascript) build, requires:
# - emscripten
emcc ./main_sdl.c -s USE_SDL=2 -O3 -lopenal --shell-file HTMLshell.html -o game.html
else else
echo "unknown parameter: $1" echo "unknown parameter: $1"
fi fi