I'm trying to make a kernel module, but I'm getting stuck on the kbuild system. Can anyone advise of my problem w/ this Makefile? I'm using kernel 2.6.31-r6
Code:
obj-$(CONFIG_ABC) += abc.o
abc-objs := dabc.o
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
And when I try to build, here's the error I get.
Code:
$ make
make -C M=/home/projects/ABC/ksrc/net/abc modules
make: *** M=/home/projects/ABC/ksrc/net/abc: No such file or directory. Stop.
make: *** [modules] Error 2
/home/projects/ABC/ksrc/net/abc is the directory where I've placed the Makefile and source files.