-
Notifications
You must be signed in to change notification settings - Fork 5
/
buildljt.macos
executable file
·64 lines (54 loc) · 1.2 KB
/
buildljt.macos
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
set -u
set -e
SCRIPTDIR=`dirname $0`
if ls $OUTDIR/files/libjpeg-turbo-[0-9]*.dmg >/dev/null 2>&1; then
if [ $FORCEBINARY = 0 ]; then
>&2 echo
>&2 echo Binary already exists!
>&2 echo Run $SCRIPT -fb to rebuild it.
>&2 echo
exit 1
else
rm -f $OUTDIR/files/libjpeg-turbo.dmg
fi
fi
exec 2>&1
export CTEST_OUTPUT_ON_FAILURE=1
pushd libjpeg-turbo-[0-9]*
PRIMARY=macosx8664
SECONDARY=macosarm64
if [ "`uname -m`" = "arm64" ]; then
PRIMARY=macosarm64
SECONDARY=macosx8664
fi
mkdir $SECONDARY
pushd $SECONDARY
$SCRIPTDIR/setupscripts/$SECONDARY -DWITH_JAVA=0
export NUMCPUS=`sysctl -n hw.ncpu`
make -j$NUMCPUS --load-average=$NUMCPUS
if [ "`uname -m`" = "arm64" ]; then
# Go go gadget Rosetta
ctest -j$NUMCPUS
fi
popd
mkdir $PRIMARY
pushd $PRIMARY
$SCRIPTDIR/setupscripts/$PRIMARY
export NUMCPUS=`sysctl -n hw.ncpu`
make -j$NUMCPUS --load-average=$NUMCPUS
ctest -j$NUMCPUS
make dmg
mv libjpeg-turbo-[0-9]*.dmg $OUTDIR/files/
popd
mkdir iosarm64
pushd iosarm64
$SCRIPTDIR/setupscripts/iosarm64
make -j$NUMCPUS --load-average=$NUMCPUS
popd
mkdir iosx8664
pushd iosx8664
$SCRIPTDIR/setupscripts/iosx8664
make -j$NUMCPUS --load-average=$NUMCPUS
make dmg
mv libjpeg-turbo-ios-[0-9]*.dmg $OUTDIR/files/
popd