makefiles: Add support for building Unix .so libraries.