Skip to content

Commit

Permalink
Android: Tell make about sub-makes to speed up build
Browse files Browse the repository at this point in the history
Before, sub-makes called by make were called without make knowing they
were sub-makes. This however led make's jobserver not do its tasks,
and the build process ended up with inefficient parralelisation. This
commit fixes this by applying the two ways the make manual tells
about: putting + to the start of the line (used when ndk-build is
invoked), and exchanging "make" with "$(MAKE)".

Before, make complained with messages like:

make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

This complaint can now only been seen for openssl. openssl has issues
if make gets exchanged with $(MAKE): if exchanged, above error message
is multiplied for various subdirs of the openssl source tree.

On a 4 core box, "make -j 4" build time from "make clean_all" cleaned
source tree could be improved from 15:34 minutes to 10:45 minutes.
This means a speedup of 45%.
  • Loading branch information
est31 committed Dec 23, 2015
1 parent 7eb3ed8 commit 98d16e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/android/Makefile
Expand Up @@ -229,7 +229,7 @@ openal_download :
openal : $(OPENAL_LIB)

$(OPENAL_LIB): $(OPENAL_TIMESTAMP)
@REFRESH=0; \
+ @REFRESH=0; \
if [ ! -e ${OPENAL_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
Expand Down Expand Up @@ -274,7 +274,7 @@ ogg_download :
ogg : $(OGG_LIB)

$(OGG_LIB): $(OGG_TIMESTAMP)
@REFRESH=0; \
+ @REFRESH=0; \
if [ ! -e ${OGG_TIMESTAMP_INT} ] ; then \
echo "${OGG_TIMESTAMP_INT} doesn't exist"; \
REFRESH=1; \
Expand Down Expand Up @@ -419,7 +419,7 @@ freetype_download :
freetype : $(FREETYPE_LIB)

$(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
@REFRESH=0; \
+ @REFRESH=0; \
if [ ! -e ${FREETYPE_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
Expand Down Expand Up @@ -535,7 +535,7 @@ $(IRRLICHT_TIMESTAMP) : irrlicht_download
irrlicht : $(IRRLICHT_LIB)

$(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB)
@REFRESH=0; \
+ @REFRESH=0; \
if [ ! -e ${IRRLICHT_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
Expand Down

0 comments on commit 98d16e0

Please sign in to comment.