Use -I instead of -isystem when including our own headers for testing
Use -isystem makes GCC emulate that our own headers are system headers,
giving them the lowest priority when it search for a particular header
included with <>. This could be problematic in certain building
environments.
Avoid rebuilding of doc, (mem)test and install targets
This patch improves the Makefiles to avoid unnecessary rebuilding of some
targets, like doc/test/memtest/install, which only need to be "rebuilt"
when the sources has changed.
This is implemented using empty target files to record events, as
described in the GNU make manual[1].
Improve handling of CFLAGS and LDFLAGS make variables
The Makefile now uses 3 flavors of C/LDFLAGS variables: LOCAL_*, LI_* and
the plain ones.
LOCAL_* are used for mandatory local flags, like -std=C++98 and such,
LI_* are reserved for special "local-install" flags (set by the
super-repository). Plain C/LDFLAGS can be set by the user at make-time as
usual.