From 1bdbdfdf12ae35f08f5dcbec06a35c8d0f11ef55 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 29 May 2020 14:37:49 +0200 Subject: 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 --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-55-g7522