Files
Luflosi c2e90ebe64 Allow changing KERNEL_DIR (#8)
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.
2021-04-19 19:31:58 -03:00

17 lines
421 B
Makefile

# SPDX-License-Identifier: GPL-2.0
#
# Makefile for the out-of-tree Linux APFS module.
#
KERNELRELEASE ?= $(shell uname -r)
KERNEL_DIR ?= /lib/modules/$(KERNELRELEASE)/build
obj-m = apfs.o
apfs-y = btree.o dir.o extents.o file.o inode.o key.o message.o \
namei.o node.o object.o super.o symlink.o unicode.o xattr.o
default:
make -C $(KERNEL_DIR) M=$(shell pwd)
clean:
make -C $(KERNEL_DIR) M=$(shell pwd) clean