File tree 15 files changed +23
-19
lines changed
15 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ case $OSTYPE in
93
93
;;
94
94
esac
95
95
96
+ if [ -f /proc/cpuinfo ]; then
97
+ export MAKE_JOBS=($( grep -c ^processor /proc/cpuinfo) +1 )
98
+ else
99
+ export MAKE_JOBS=1
100
+ fi
96
101
97
102
# Internals
98
103
CRED=" \x1b[31;01m"
@@ -214,7 +219,7 @@ function push_arm() {
214
219
export RANLIB=" $TOOLCHAIN_PREFIX -ranlib"
215
220
export LD=" $TOOLCHAIN_PREFIX -ld"
216
221
export STRIP=" $TOOLCHAIN_PREFIX -strip --strip-unneeded"
217
- export MAKE=" make -j5 "
222
+ export MAKE=" make"
218
223
export READELF=" $TOOLCHAIN_PREFIX -readelf"
219
224
220
225
# This will need to be updated to support Python versions other than 2.7
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ function build_c_igraph() {
48
48
fi
49
49
50
50
51
- try $MAKE
52
- try $MAKE install
51
+ try $MAKE -j $MAKE_JOBS
52
+ try $MAKE -j $MAKE_JOBS install
53
53
54
54
pop_arm
55
55
touch .built
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function build_freetype() {
18
18
push_arm
19
19
export LDFLAGS=" $LDFLAGS -L$BUILD_harfbuzz /src/.libs/"
20
20
try ./configure --host=arm-linux-androideabi --prefix=$BUILD_freetype --without-zlib --with-png=no --enable-shared
21
- try make -j5
21
+ try make -j $MAKE_JOBS
22
22
pop_arm
23
23
24
24
try cp $BUILD_freetype /objs/.libs/libfreetype.so $LIBS_PATH
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function build_harfbuzz() {
27
27
# try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --enable-shared --without-freetype --without-glib
28
28
# ~ try ./autogen.sh --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --without-freetype --without-glib
29
29
try ./configure --without-icu --host=arm-linux-androideabi --prefix=" $BUILD_PATH /python-install" --without-freetype --without-glib
30
- try make -j5
30
+ try make -j $MAKE_JOBS
31
31
pop_arm
32
32
try cp -L $BUILD_harfbuzz /src/.libs/libharfbuzz.so $LIBS_PATH
33
33
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function build_hostpython() {
25
25
cd $BUILD_hostpython
26
26
27
27
try ./configure
28
- try make -j5
28
+ try make -j $MAKE_JOBS
29
29
try mv Parser/pgen hostpgen
30
30
31
31
if [ -f python.exe ]; then
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function build_libevent() {
22
22
23
23
push_arm
24
24
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi --prefix=$BUILD_libevent /build/
25
- try make install
25
+ try make -j $MAKE_JOBS install
26
26
pop_arm
27
27
}
28
28
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function build_libpq() {
29
29
push_arm
30
30
31
31
try ./configure --without-readline --host=arm-linux
32
- try make submake-libpq
32
+ try make -j $MAKE_JOBS submake-libpq
33
33
try cp -a $BUILD_libpq /src/interfaces/libpq/libpq.a $LIBS_PATH
34
34
35
35
pop_arm
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function build_libsodium() {
23
23
push_arm
24
24
25
25
try ./configure --enable-minimal --disable-soname-versions --host=" arm-linux-androideabi" --enable-shared
26
- try make
26
+ try make -j $MAKE_JOBS
27
27
28
28
try cp -L $BUILD_libsodium /src/libsodium/.libs/libsodium.so $LIBS_PATH
29
29
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ function build_libtorrent() {
28
28
29
29
# Build the Python bindings with Boost.Build and some dependencies recursively (libtorrent-rasterbar, Boost.*)
30
30
# Also link to openssl
31
- # Hardcoded on -j5 because P4A does it too
32
- $BOOST_ROOT /b2 -q -j5 target-os=android link=static boost-link=static boost=source threading=multi toolset=gcc-android geoip=off encryption=tommath linkflags=" $BOOSTSTUFF " release
31
+ $BOOST_ROOT /b2 -q -j$MAKE_JOBS target-os=android link=static boost-link=static boost=source threading=multi toolset=gcc-android geoip=off encryption=tommath linkflags=" $BOOSTSTUFF " release
33
32
34
33
# Copy the module
35
34
try cp -L libtorrent.so $SITEPACKAGES_PATH
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function build_libxml2() {
26
26
--without-modules --without-legacy --without-history --without-debug --without-docbook --without-python
27
27
try $SED ' s/ runtest\$(EXEEXT) \\/ \\/' Makefile
28
28
try $SED ' s/ testrecurse\$(EXEEXT)$//' Makefile
29
- try make
29
+ try make -j $MAKE_JOBS
30
30
31
31
pop_arm
32
32
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function build_libxslt() {
30
30
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi \
31
31
--without-plugins --without-debug --without-python --without-crypto \
32
32
--with-libxml-src=$BUILD_libxml2
33
- try make
33
+ try make -j $MAKE_JOBS
34
34
35
35
36
36
pop_arm
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function build_libyaml() {
23
23
24
24
# using arm-linux-eabi does not create a shared library
25
25
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi
26
- try make
26
+ try make -j $MAKE_JOBS
27
27
28
28
try cp -L $BUILD_libyaml /src/.libs/libyaml.so $LIBS_PATH
29
29
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ function build_opencv() {
45
45
-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_ANDROID_EXAMPLES=OFF \
46
46
-DPYTHON_PACKAGES_PATH=$SITEPACKAGES_PATH \
47
47
$_cvsrc
48
- try make -j8 opencv_python
48
+ try make -j $MAKE_JOBS opencv_python
49
49
try cmake -DCOMPONENT=python -P ./cmake_install.cmake
50
50
try cp -a $_cvbuild /lib/$ARCH /lib* .so $LIBS_PATH
51
51
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function build_openssl() {
23
23
push_arm
24
24
25
25
try ./Configure no-dso no-krb5 linux-armv4
26
- try make build_libs
26
+ try make -j $MAKE_JOBS build_libs
27
27
28
28
pop_arm
29
29
}
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function build_python() {
105
105
106
106
try ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix=" $BUILD_PATH /python-install" --enable-shared --disable-toolbox-glue --disable-framework
107
107
echo ./configure --host=$HOSTARCH --build=$BUILDARCH OPT=$OFLAG --prefix=" $BUILD_PATH /python-install" --enable-shared --disable-toolbox-glue --disable-framework
108
- echo $MAKE HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
108
+ echo $MAKE -j $MAKE_JOBS HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
109
109
cp HOSTPYTHON=$BUILD_python /hostpython python
110
110
111
111
# FIXME, the first time, we got a error at:
@@ -115,10 +115,10 @@ function build_python() {
115
115
# check if we can avoid this part.
116
116
117
117
debug ' First install (failing..)'
118
- $MAKE install HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
118
+ $MAKE -j $MAKE_JOBS install HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
119
119
debug ' Second install.'
120
120
touch python.exe python
121
- $MAKE install HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
121
+ $MAKE -j $MAKE_JOBS install HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
122
122
pop_arm
123
123
124
124
system=$( uname -s)
You can’t perform that action at this time.
0 commit comments