linamh/app-emulation/opencbm/files/0.4.3_rc2/02_module_makefile.diff

45 lines
1.4 KiB
Diff
Raw Normal View History

From: Frédéric Brière <fbriere@fbriere.net>
Subject: [PATCH] Allow invoking the module Makefile from the kernel tree
This makes it possible to invoke the (renamed) module Makefile directly from
the Linux kernel source tree, without the need to set $(here) or create a
symlink. In particular, it should make DKMS support a little bit easier.
Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
---
sys/linux/LINUX/Makefile | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sys/linux/LINUX/Makefile b/sys/linux/LINUX/Makefile
index cb14aab..19a49a2 100644
--- a/sys/linux/LINUX/Makefile
+++ b/sys/linux/LINUX/Makefile
@@ -2,6 +2,7 @@
ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS := $(CBM4LINUX_KERNEL_FLAGS) -I$(here)/../../include -I$(here)/../../include/LINUX
+ccflags-y += -I$(src)/../../include -I$(src)/../../include/LINUX
obj-m := cbm.o
cbm-objs := cbm_module.o
@@ -18,7 +19,6 @@ all: cbm.o
.PHONY: all clean mrproper install uninstall install-files
clean:
rm -f cbm.mod.c *.o *.ko .cbm* Modules.symvers
- rm -f Makefile
mrproper: clean
@@ -38,8 +38,6 @@ ifneq ($(UDEV_RULES),)
endif
cbm.o: cbm_module.c
- -ln -s LINUX/Makefile Makefile
$(MAKE) -C $(KERNEL_SOURCE) here=`pwd` CBM4LINUX_KERNEL_FLAGS=$(KERNEL_FLAGS) SUBDIRS=`pwd` modules
- -rm -f Makefile
endif
--
tg: (e970caa..) features/module_makefile (depends on: upstream)