linamh/app-emulation/opencbm/files/0.4.3_rc2/0003-Allow-invoking-the-mod...

48 lines
1.5 KiB
Diff

From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <fbriere@fbriere.net>
Date: Fri, 20 May 2011 12:50:53 -0400
Subject: Allow invoking the module Makefile from the kernel tree
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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
--