Signed-off-by: falkTX <falktx@falktx.com>tags/v1.0
@@ -16,47 +16,6 @@ fi | |||||
# --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
CROSS_COMPILING=0 | |||||
MACOS=0 | |||||
MACOS_OLD=0 | |||||
WIN32=0 | |||||
WIN64=0 | |||||
case ${target} in | |||||
"macos") | |||||
MACOS=1 | |||||
;; | |||||
"macos-old") | |||||
MACOS=1 | |||||
MACOS_OLD=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win32") | |||||
WIN32=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win64") | |||||
WIN32=1 | |||||
WIN64=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"native") | |||||
echo "TODO" | |||||
exit 2 | |||||
;; | |||||
default) | |||||
echo "Invalid target '${target}', possible values are:" | |||||
echo "\tmacos" | |||||
echo "\tmacos-old" | |||||
echo "\twin32" | |||||
echo "\twin64" | |||||
echo "\tnative" | |||||
exit 2 | |||||
;; | |||||
esac | |||||
# --------------------------------------------------------------------------------------------------------------------- | |||||
# TODO check for depedencies: | # TODO check for depedencies: | ||||
# - curl | # - curl | ||||
# - cmake | # - cmake | ||||
@@ -66,6 +25,7 @@ esac | |||||
# - sed | # - sed | ||||
# - tar | # - tar | ||||
source setup/check_target.sh | |||||
source setup/env.sh | source setup/env.sh | ||||
source setup/functions.sh | source setup/functions.sh | ||||
source setup/versions.sh | source setup/versions.sh | ||||
@@ -19,47 +19,7 @@ fi | |||||
# --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||
CROSS_COMPILING=0 | |||||
MACOS=0 | |||||
MACOS_OLD=0 | |||||
WIN32=0 | |||||
WIN64=0 | |||||
case ${target} in | |||||
"macos") | |||||
MACOS=1 | |||||
;; | |||||
"macos-old") | |||||
MACOS=1 | |||||
MACOS_OLD=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win32") | |||||
WIN32=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win64") | |||||
WIN32=1 | |||||
WIN64=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"native") | |||||
echo "TODO" | |||||
exit 2 | |||||
;; | |||||
default) | |||||
echo "Invalid target '${target}', possible values are:" | |||||
echo "\tmacos" | |||||
echo "\tmacos-old" | |||||
echo "\twin32" | |||||
echo "\twin64" | |||||
echo "\tnative" | |||||
exit 2 | |||||
;; | |||||
esac | |||||
# --------------------------------------------------------------------------------------------------------------------- | |||||
source setup/check_target.sh | |||||
source setup/env.sh | source setup/env.sh | ||||
source setup/functions.sh | source setup/functions.sh | ||||
source setup/versions.sh | source setup/versions.sh | ||||
@@ -0,0 +1,50 @@ | |||||
#!/bin/bash | |||||
CROSS_COMPILING=0 | |||||
LINUX=0 | |||||
MACOS=0 | |||||
MACOS_OLD=0 | |||||
WIN32=0 | |||||
WIN64=0 | |||||
function check_target() { | |||||
case ${target} in | |||||
"macos") | |||||
MACOS=1 | |||||
;; | |||||
"macos-old") | |||||
MACOS=1 | |||||
MACOS_OLD=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win32") | |||||
WIN32=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"win64") | |||||
WIN32=1 | |||||
WIN64=1 | |||||
CROSS_COMPILING=1 | |||||
;; | |||||
"Linux") | |||||
LINUX=1 | |||||
;; | |||||
"native") | |||||
target=$(uname -s) | |||||
check_target | |||||
;; | |||||
default) | |||||
echo "Invalid target '${target}', possible values are:" | |||||
echo "\tmacos" | |||||
echo "\tmacos-old" | |||||
echo "\twin32" | |||||
echo "\twin64" | |||||
echo "\tnative" | |||||
exit 2 | |||||
;; | |||||
esac | |||||
} | |||||
check_target |
@@ -10,6 +10,7 @@ if [ "${MACOS}" -eq 1 ]; then | |||||
else | else | ||||
PAWPAW_TARGET="macos" | PAWPAW_TARGET="macos" | ||||
fi | fi | ||||
elif [ "${WIN32}" -eq 1 ]; then | elif [ "${WIN32}" -eq 1 ]; then | ||||
CMAKE_SYSTEM_NAME="Windows" | CMAKE_SYSTEM_NAME="Windows" | ||||
if [ "${WIN64}" -eq 1 ]; then | if [ "${WIN64}" -eq 1 ]; then | ||||
@@ -17,8 +18,14 @@ elif [ "${WIN32}" -eq 1 ]; then | |||||
else | else | ||||
PAWPAW_TARGET="win32" | PAWPAW_TARGET="win32" | ||||
fi | fi | ||||
elif [ "${LINUX}" -eq 1 ]; then | |||||
CMAKE_SYSTEM_NAME="Linux" | |||||
PAWPAW_TARGET="linux" | |||||
else | else | ||||
PAWPAW_TARGET="native" | |||||
echo "Unknown target '${target}'" | |||||
exit 4 | |||||
fi | fi | ||||
# --------------------------------------------------------------------------------------------------------------------- | # --------------------------------------------------------------------------------------------------------------------- | ||||