forked from zcutlip/nvram-faker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildmips.sh
executable file
·52 lines (39 loc) · 862 Bytes
/
buildmips.sh
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
#!/bin/sh
export ARCH=mips
TARGET=$1
# Sets up toolchain environment variables for various mips toolchain
warn()
{
echo "$1" >&2
}
if [ ! -z $(which mips-linux-gcc) ];
then
export CC=$(which mips-linux-gcc)
else
warn "Not setting CC: can't locate mips-linux-gcc."
fi
if [ ! -z $(which mips-linux-ld) ];
then
export LD=$(which mips-linux-ld)
else
warn "Not setting LD: can't locate mips-linux-ld."
fi
if [ ! -z $(which mips-linux-ar) ];
then
export AR=$(which mips-linux-ar)
else
warn "Not setting AR: can't locate mips-linux-ar."
fi
if [ ! -z $(which mips-linux-strip) ];
then
export STRIP=$(which mips-linux-strip)
else
warn "Not setting STRIP: can't locate mips-linux-strip."
fi
if [ ! -z $(which mips-linux-nm) ];
then
export NM=$(which mips-linux-nm)
else
warn "Not setting NM: can't lcoate mips-linux-nm."
fi
make $TARGET || exit $?