This prevents any inconsistency on the command line between ALOG_VERSION
(or its default value) and LIBRARY_KIND (or its default value).
Require an explicit ALOG_VERSION in gprbuild command line. The default
was dynamic in Makefile and static in projects, leading to some
confusion. For example, debian/rules was setting VERSION for tests.
Split build_lib_[dynamic|static] Makefile targets as done for install.
Rename the project version internal variable after the external one,
and move it from common project to the only project it affects.
Pass Ada and C flags to every gprbuild command. Each run may detect that
the library must be updated and recompile Ada or C files. Add missing C
flags when building tests.
Put Adaflags after default options to allow overriding. Only parse
environment once for these flags. Handle CPPFLAGS as well as CFLAGS.
Avoid mixing command line options with project compiler_switches, as the
precedence is not well defined. Use package renamings or extensions
instead of variables to reduce boilerplate.
Pass LDFLAGS to every gprbuild invocation, but use it only when linking.
Put LDFLAGS before normal (-l) options so that options like --as-needed
take effect. Only parse environment for LDFLAGS once. Use package
renamings or extensions instead of variables to reduce boilerplate.