This commit reorganizes the accumulation of build flags in such a way that
non-obligatory build flags can be overriden or added by specifying
CPPFLAGS, CFLAGS and LDFLAGS as arguments from command line or environment.
lib.version is only expanded if the file named by $(metafile) exists, but then it uses a hardcoded filename to do the actual expansion.
this patch uses $(metafile) to do the expansion instead.