Update build script

This commit is contained in:
Miloslav Číž 2020-10-05 20:15:04 +02:00
parent 04dc14adcd
commit 2e33ce2e2c
1 changed files with 8 additions and 6 deletions

14
make.sh
View File

@ -10,17 +10,20 @@ fi
clear; clear;
if [ $1 == "sdl" ]; then
C_FLAGS='-x c -Wall -Wextra -fmax-errors=5 -pedantic -O3 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -o game'
if [ $1 == "sdl" ]; then
# PC SDL build, requires:
# - g++
# - SDL2 (dev) package
g++ -x c -g -Wall -Wextra -fmax-errors=5 -pedantic -O3 -Wall -Wextra \
-Wno-unused-parameter -Wno-missing-field-initializers -o game main_sdl.c \
-lSDL2 2>&1 >/dev/null && ./game
elif [ $1 == "pokitto" ]; then
g++ ${C_FLAGS} main_sdl.c -lSDL2 2>&1 >/dev/null && ./game
elif [ $1 == "terminal" ]; then
# PC terminal build, requires:
# - g++
g++ ${C_FLAGS} main_terminal.c 2>&1 >/dev/null && ./game
elif [ $1 == "pokitto" ]; then
# Pokitto build, requires:
# - PokittoLib, in this folder create a symlink named "PokittoLib" to the
# "Pokitto" subfolder of PokittoLib
@ -32,7 +35,6 @@ elif [ $1 == "pokitto" ]; then
make
./PokittoEmu BUILD/firmware.bin
elif [ $1 == "emscripten" ]; then
# emscripten (browser Javascript) build, requires:
# - emscripten