tests used to be defined ad hoc and test definitions
are scattered confusingly over various directories.
Now built some simple rules into the buildsystem
to allow organising the tests into layers and
linking them accordingly.
Note: this switches to building shared objects
for the test classes too, which effectively speeds up
both re-building and re-running of test cases
Our libraries constitute a clear dependency hierarchy,
we do not want circular dependencies. Declaring these
dependencies while creating the shared libraries would
allow strict checking by the linker; but unfortunately
this also creates transitive depdendencies stored as
DT_NEEDED tags.
While basically this would be just fine, the resolution of $ORIGIN
on gets confused in case of transitively defined library dependencies
over multiple hops, especially in case when actually no symbol of this
transitive dependency is used. Since these newer systems set the
--as-needed switch for linking by default, these unnecessary
DT_NEEDED entries will be purged from the executable, but of course
not from the shared library causing the transitive dependencies.
As a consequence, when loading the executable, the $ORIGIN resolution
mechanism doesn't act on the dependencies recorded in the library,
causing the shared loader to abort with an "unresolved dependency"
So the resolution for these problems is not to use transitive
dependencies on libraries intended to be found via $ORIGIN
The goal is to make the build scrips more clear
at first sight. So move the main build targets
into a separate SConscript, to make them similar
to the tests, research and tools.
The final goal of this makeover is to reduce
the main SConstruct as much as possible