This is enabled for platforms/compilers that support the -MMD
option, which creates a dependency file named out.d when compiling
to a file named out.o, only including local, not system headers.
The additional -MP option adds phony targets for all included
headers, to avoid having make error out due to "no rule to make
target foo.h" if a header is renamed/removed.
This makes sure that all the right files are rebuilt if a header
is changed, avoiding the need for a full rebuild if only a few
files are affected.
This probably simplifies the default case for most users of the
library, and reduces the risk of people accidentally trying to use
an unoptimized build.
On fresh clone of repo, "make test" used to give,
"make: *** No rule to make target `codec_unittest', needed by `test'. Stop."
because gtest was not available. This message is not very helpful. Instead printing
that gtest is not available and the command to run to obtain gtest.
By setting an overridable variable in the main makefile, we avoid
having to move the default -DUNIX64 into each of the other unix
platform makefiles, but still allowing the mingw platform to
override it.
This makes sure a "make codec_unittest" succeeds without any
prior make invocation. The usage of the encoder libraries in
the unit test was added in 6f58a0c1.
This makes sure that all the dependency libs are built before trying
to link them together, fixing parallel make (which occasionally
failed due to trying to link the encoder or decoder command line
binaries before the libs had been built) and also fixes building an
individual component by e.g. "make h264enc".