This makes the user able to use the familiar `make install` syntax, and
allows overriding of the default directories using the DESTDIR and
PREFIX variables, for example:
make DESTDIR=packaging PREFIX=/usr install
This provides users of this library the guarantee that the ABI will
stay stable when MAJOR will reach 1, and will stay backwards compatible
for the entire duration of the 1.x.y branch.
It does require the maintainers to always update the version in the
Makefile at every ABI change.
sha256.c and aes.c contain conflicting declarations, so we need to compile them
as separate units. This requires a bit more Makefile-shuffling; the build
directory now includes 'src' or 'lib' as appropriate, and we just mkdir -p
before each compilation.
We want to stop aes_* and sha_* functions leaking out of our .so, as well as
internal _olm_* symbols.
This also means we need to link the unit tests against the objects. Possibly we
should distinguish between unit tests and integration tests.
Now that we have C and C++, we need to split the compile and link steps
(because we need different flags for the C and C++ files), so this is
easier with a Makefile.