-
Notifications
You must be signed in to change notification settings - Fork 2
/
make
executable file
·95 lines (81 loc) · 2.88 KB
/
make
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
#
# @author iota square [i2]
# <pre>
# ██╗ ██████╗ ████████╗ █████╗ ██████╗
# ██║██╔═══██╗╚══██╔══╝██╔══██╗╚════██╗
# ██║██║ ██║ ██║ ███████║ █████╔╝
# ██║██║ ██║ ██║ ██╔══██║██╔═══╝
# ██║╚██████╔╝ ██║ ██║ ██║███████╗
# ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
# </pre>
#
# @date 07-09-2019
# @file make
# @brief IOTA2 HUB application make utility.
#
# @copyright GNU GPU v3
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Free Software, Hell Yeah!
#
scriptname=${0##*/}
scriptdir=${0%*$scriptname}
# Rerun the script with environment cleared out
if [ "$1" != "ENVCLEARED" ]; then
exec -c "$scriptdir$scriptname" ENVCLEARED "$PATH" "$HOME" "$@"
exit
else
shift
export SAVED_PATH=$1
shift
export SAVED_HOME=$1
shift
fi
# Delete some automatic bash environment variables
unset PATH
unset TERM
unset PWD
unset OLDPWD
unset SHLVL
linux32unamestr=`"${scriptdir}tools/common/Linux32/uname" 2> /dev/null`
linux64unamestr=`"${scriptdir}tools/common/Linux64/uname" 2> /dev/null`
osxunamestr=`"${scriptdir}tools/common/OSX/uname" 2> /dev/null`
win32unamestr=`"${scriptdir}tools/common/Win32/uname.exe" -o 2> /dev/null`
if [ "$linux32unamestr" == "Linux" ] || [ "$linux64unamestr" == "Linux" ]; then
# Linux
linuxuname64str=`${scriptdir}tools/common/Linux64/uname -m 2> /dev/null`
if [ "$linuxuname64str" == "x86_64" ]; then
# Linux64
#echo Host is Linux64
"${scriptdir}tools/common/Linux64/make" "$@" HOST_OS=Linux64
else
# Linux32
#echo Host is Linux32
"${scriptdir}tools/common/Linux32/make" "$@" HOST_OS=Linux32
fi
elif [[ "$osxunamestr" == *Darwin* ]]; then
#OSX
#echo Host is OSX
"${scriptdir}tools/common/OSX/make" "$@" HOST_OS=OSX
elif [ "${win32unamestr}" == "MinGW" ]; then
#MinGW / Cygwin
#echo Host is MinGW
"${scriptdir}tools/common/Win32/make.exe" "$@" HOST_OS=Win32
else
echo Unknown host
echo Linux32 uname: \"${linux32unamestr}\"
echo Linux64 uname: \"${linux32unamestr}\"
echo OSX uname: \"${osxunamestr}\"
echo Win32 uname: \"${win32unamestr}\"
fi
# *********************** (C) COPYRIGHT iota2 ***[i2]******END OF FILE**********