Add compilation time cost for each source file in make file


Encountered an issue of extreme long time compiling days ago, so we tried to add a time cost output in the Makefile to locate what on earth happened during the compilation.

There are two Makefiles need to be modified, one is Linux based Makefile, another is Android based Makefile

Linux Makefile:

or

Test Makefile: http://rg4.net/p/tools/add-time-output-to-makefile/common.mk

Android Makefile:
You need to modify NDK common make file, definitions.mk, to archive this, it’s locating at /path-to-ndk/android-ndk-r7c/build/core/definitions.mk

Test Makefile: http://rg4.net/p/tools/add-time-output-to-makefile/definitions.mk

Leave a comment

Your email address will not be published. Required fields are marked *