mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-04 16:24:57 -05:00
add parallel make
This commit is contained in:
parent
0f6e0d6db9
commit
a0c0c6ae7b
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/sh
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
numcores=`getconf _NPROCESSORS_ONLN`
|
||||
|
||||
numjobs=$(($numcores * 2 + 1))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install binutils
|
||||
#---------------------------------------------------------------------------------
|
||||
|
|
@ -20,7 +24,7 @@ fi
|
|||
|
||||
if [ ! -f built-binutils ]
|
||||
then
|
||||
$MAKE || { echo "Error building binutils"; exit 1; }
|
||||
$MAKE -j$numjobs || { echo "Error building binutils"; exit 1; }
|
||||
touch built-binutils
|
||||
fi
|
||||
|
||||
|
|
@ -64,7 +68,7 @@ fi
|
|||
|
||||
if [ ! -f built-gcc ]
|
||||
then
|
||||
$MAKE all-gcc || { echo "Error building gcc stage1"; exit 1; }
|
||||
$MAKE all-gcc -j$numjobs || { echo "Error building gcc stage1"; exit 1; }
|
||||
touch built-gcc
|
||||
fi
|
||||
|
||||
|
|
@ -97,7 +101,7 @@ fi
|
|||
|
||||
if [ ! -f built-newlib ]
|
||||
then
|
||||
$MAKE || { echo "Error building newlib"; exit 1; }
|
||||
$MAKE -j$numjobs || { echo "Error building newlib"; exit 1; }
|
||||
touch built-newlib
|
||||
fi
|
||||
|
||||
|
|
@ -118,7 +122,7 @@ cd $target/gcc
|
|||
|
||||
if [ ! -f built-stage2 ]
|
||||
then
|
||||
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
|
||||
$MAKE all -j$numjobs || { echo "Error building gcc stage2"; exit 1; }
|
||||
touch built-stage2
|
||||
fi
|
||||
|
||||
|
|
@ -152,7 +156,7 @@ fi
|
|||
|
||||
if [ ! -f built-gdb ]
|
||||
then
|
||||
$MAKE || { echo "Error building gdb"; exit 1; }
|
||||
$MAKE -j$numjobs || { echo "Error building gdb"; exit 1; }
|
||||
touch built-gdb
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user