[build] Added shell script to compile the project.

This commit is contained in:
Joao Matos 2017-04-28 18:49:37 +01:00
Родитель d7b8fceb99
Коммит 63c5c04fa1
1 изменённых файлов: 18 добавлений и 0 удалений

18
build/Compile.sh Executable file
Просмотреть файл

@ -0,0 +1,18 @@
#!/usr/bin/env bash
#set -e
CUR_DIR=$(cd "$(dirname "$0")"; pwd)
if [ "$(uname)" == "Darwin" ]; then
PREMAKE=$CUR_DIR/../external/CppSharp/build/premake5-osx;
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PREMAKE=$CUR_DIR/../external/CppSharp/build/premake5-linux-64;
fi
BUILD_CONF=release
$PREMAKE --file=$CUR_DIR/premake5.lua gmake
config=$BUILD_CONF make -C $CUR_DIR/gmake/
BUILD_CONF_DIR="$(tr '[:lower:]' '[:upper:]' <<< ${BUILD_CONF:0:1})${BUILD_CONF:1}"
BUILD_DIR=$CUR_DIR/gmake/lib/$BUILD_CONF_DIR