summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Bauer2020-05-29 14:37:49 +0200
committerJonathan Bauer2020-05-29 14:37:49 +0200
commit1bdbdfdf12ae35f08f5dcbec06a35c8d0f11ef55 (patch)
tree2e64659e53742b64f598b2e36a1d3cb32d1371b9 /Makefile
parentInitial code from Manuel Bentele (diff)
downloadxloop-1bdbdfdf12ae35f08f5dcbec06a35c8d0f11ef55.tar.gz
xloop-1bdbdfdf12ae35f08f5dcbec06a35c8d0f11ef55.tar.xz
xloop-1bdbdfdf12ae35f08f5dcbec06a35c8d0f11ef55.zip
Initial working state
* Moved old Makefile to Kbuild.in * New Makefile to compile against running kernel (or KDIR) * Moved file format defines from loop/include/uapi/linux/loop.h to loop_file_fmt.h * Moved definitions of loop_info{,64} to loop_file_fmt.h * Renamed loop_info{,64} to xloop_info{,64} * Removed checks for file format support which was now unneeded
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