aboutsummaryrefslogtreecommitdiff
path: root/build.common
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2014-12-28 16:02:47 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2014-12-28 16:02:47 -0800
commit1eb883d11064b3ef87128cb5a58f015b839b27e3 (patch)
treef3fc0bb0346b51d4508fc569fa41a0ec3fd73bde /build.common
parent2991201a5263ee9e88ca380d53383cf67e3eae59 (diff)
downloadriscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.zip
riscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.tar.gz
riscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.tar.bz2
Make build.common BSD friendly
Diffstat (limited to 'build.common')
-rw-r--r--build.common19
1 files changed, 13 insertions, 6 deletions
diff --git a/build.common b/build.common
index cb46121..23cf589 100644
--- a/build.common
+++ b/build.common
@@ -9,6 +9,13 @@ then
exit 1
fi
+if [ ! -f gmake ]
+then
+ MAKE=gmake
+else
+ MAKE=make
+fi
+
PATH="$RISCV/bin:$PATH"
#GCC_VERSION=`gcc -v 2>&1 | tail -1 | awk '{print $3}'`
@@ -26,9 +33,9 @@ function build_project {
echo "Configuring project $1"
../configure $2 $3 $4 $5 $6 > build.log
echo "Building project $1"
- make -j$JOBS >> build.log
+ $MAKE -j$JOBS >> build.log
echo "Installing project $1"
- make -j$JOBS install >> build.log
+ $MAKE -j$JOBS install >> build.log
cd - > /dev/null
}
@@ -36,12 +43,12 @@ function build_tests {
echo
cd riscv-tests/isa > /dev/null
echo "Building project riscv-tests/isa"
- make -j$JOBS clean > /dev/null
- make -j$JOBS > /dev/null
+ $MAKE -j$JOBS clean > /dev/null
+ $MAKE -j$JOBS > /dev/null
cd - > /dev/null
cd riscv-tests/benchmarks > /dev/null
echo "Building project riscv-tests/benchmarks"
- make -j$JOBS clean > /dev/null
- make -j$JOBS > /dev/null
+ $MAKE -j$JOBS clean > /dev/null
+ $MAKE -j$JOBS > /dev/null
cd - > /dev/null
}