kernel module template (was "cannot launch kdevdesigner")
kitts
kitts.mailinglists at gmail.com
Tue Oct 3 19:10:07 BST 2006
On Monday 02 October 2006 18:56 IST, Amilcar do Carmo Lucas wrote:
> A patch would be nice !
With pleasure. Unfortunately, i have no experience with creating patches.
While im in the process of doing so, i am attaching the modified file of
the template makefile located under "languages/cpp/app_templates/kmod"
I cant however, guarantee it working with the 2.4 kernel tree. I have no
test setup. If someone knows better, please insert the changes in a
condition check for 2.6 kernels.
--
Cheers!
kitts
-------------- next part --------------
TARGET = %{APPNAMELC}
OBJS = %{APPNAMELC}-driver.o
MDIR = drivers/misc
EXTRA_CFLAGS = -DEXPORT_SYMTAB
CURRENT = $(shell uname -r)
KDIR = /lib/modules/$(CURRENT)/build
PWD = $(shell pwd)
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)
obj-m := $(TARGET).o
default:
make -C $(KDIR) SUBDIRS=$(PWD) modules
$(TARGET)-objs: $(OBJS)
ifneq (,$(findstring 2.4.,$(CURRENT)))
install:
su -c "cp -v $(TARGET).o $(DEST) && /sbin/depmod -a"
else
install:
su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a"
endif
clean:
-rm -f *.o *.ko .*.cmd .*.flags *.mod.c
-include $(KDIR)/Rules.make
More information about the KDevelop
mailing list