Makefile not building *.ko
Below is my modules Makefile. When I build it, it does build the stand-alone program kabcd in the directory below, but it doesn't build an abc.ko file which I'm expecting.
I'm thinking the var CONFIG_ABC is defined wrong. I'm building this outside of the kernel tree in my own directory, yet trying to have something that will eventually work like I'm running 'make menuconfig', but ... not sure how to set CONFIG_ABC properly, if that is my problem.
---
EXTRA_CFLAGS += -I(src)/../../include/linux/abc
obj-$(CONFIG_ABC) += abc.o
obj-$(CONFIG_ABC) += kabcd/
abc-objs := abc1.o
KERNELDIR := /lib/modules/`uname -r`/build
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
---
$ make
make -C /lib/modules/`uname -r`/build M=/home/me/projects/ABC/ksrc/net/abc modules
make[1]: Entering directory `/usr/src/linux-2.6.31-gentoo-r6'
Building modules, stage 2.
MODPOST 0 modules
make[1]: Leaving directory `/usr/src/linux-2.6.31-gentoo-r6'
My abc.c and abc1.c files aren't building a *.ko.
|