Modify make script
This commit is contained in:
parent
cbf4e7e8f5
commit
4551b50904
1 changed files with 38 additions and 1 deletions
39
make.sh
39
make.sh
|
@ -1,7 +1,44 @@
|
|||
#/bin/sh
|
||||
|
||||
# Make script for Licar, just help run the compile command. Usage:
|
||||
#
|
||||
# ./make.sh [platform [compiler]]
|
||||
|
||||
clear
|
||||
clear
|
||||
|
||||
gcc -std=c99 -g -Wall -Wextra -pedantic -O1 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -o game frontend_sdl.c `sdl2-config --libs --cflags` && ./game $@
|
||||
echo "making Licar"
|
||||
|
||||
#OPTIM="-O3"
|
||||
OPTIM="-O1" # temporary
|
||||
C_FLAGS="-std=c99 -Wall -Wextra -pedantic $OPTIM -Wno-unused-parameter -Wno-missing-field-initializers -o licar"
|
||||
COMPILER="g++"
|
||||
PLATFORM="sdl"
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
PLATFORM="$1"
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
COMPILER="$2"
|
||||
|
||||
if [ $COMPILER = "tcc" ]; then # you'll probably want to modify this
|
||||
C_FLAGS="${C_FLAGS} -L/usr/lib/x86_64-linux-gnu/pulseaudio/
|
||||
-I/home/tastyfish/git/tcc/tcc-0.9.27/include
|
||||
-I/usr/lib/gcc/x86_64-linux-gnu/8/include/"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $PLATFORM = "sdl" ]; then
|
||||
# PC SDL build, requires:
|
||||
# - g++
|
||||
# - SDL2 (dev) package
|
||||
|
||||
SDL_FLAGS=`sdl2-config --cflags --libs`
|
||||
COMMAND="${COMPILER} ${C_FLAGS} frontend_sdl.c -I/usr/local/include ${SDL_FLAGS}"
|
||||
fi
|
||||
|
||||
echo ${COMMAND}
|
||||
${COMMAND}
|
||||
|
||||
echo "done"
|
||||
|
|
Loading…
Reference in a new issue