mk: Fix shared library build
Previously, none of the object files were linked into the shared object libud3tn.so. This adds the appropriate linker flags (--whole-archive) to add everything to the shared library. -fPIE cannot be used with libs, thus, is replaced with -fPIC. Finally, the GC options (link-time removal of unneccessary sections) are only applied for linking the executable.
Edited by Felix Walter