Allow building in a different directory.
This is useful on NixOS, where all software is stored under /nix.
As a nice side-effect, this change also reduces code duplication a little.
When the module is built under Linux 5.0, a warning is given about the
use of 'SUBDIRS'. Replace it with 'M', as the message suggests.
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Copy the code of the APFS module into its own repository, without the
rest of the kernel tree. Development will continue upstream, but the
intention is to make life easier for potential users.
To get the module to build independently, rewrite the Makefile and
add a definition for the APFS_SUPER_MAGIC macro. Since the intention is
to support a range of kernel versions, use preprocessor checks to handle
kernels without statx, without iversion, and without SB_RDONLY.
Provide a README file based on the upstream documentation, but with
additional build and mount instructions. Add a LICENSE file as well.
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>