summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index a82cd7a..b7f2191 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
# SPDX-License-Identifier: GPL-2.0
+include $(PWD)/Kbuild.in
-loop-y += loop_main.o loop_file_fmt.o
-obj-$(CONFIG_BLK_DEV_LOOP) += loop.o
+ifndef KDIR
+ KDIR = /lib/modules/$(shell uname -r)/build
+endif
-obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
+all:
+ make -C "$(KDIR)" "M=$(PWD)" modules
-obj-$(CONFIG_BLK_DEV_LOOP_FILE_FMT_RAW) += loop_file_fmt_raw.o
-
-loop_file_fmt_qcow-y += loop_file_fmt_qcow_main.o loop_file_fmt_qcow_cluster.o loop_file_fmt_qcow_cache.o
-obj-$(CONFIG_BLK_DEV_LOOP_FILE_FMT_QCOW) += loop_file_fmt_qcow.o
+clean:
+ make -C "$(KDIR)" "M=$(PWD)" clean