Hi Wouter, On Tue, Oct 12, 2010 at 11:50 PM, Wouter Simons <lkml@xxxxxxxxxxxxxxxx> wrote: > On 10/12/2010 04:40 PM, Dave Hylands wrote: >> Hi guys, >> >> On Tue, Oct 12, 2010 at 6:46 AM, Wouter Simons <lkml@xxxxxxxxxxxxxxxx> wrote: >>> On 10/12/2010 12:30 PM, shivanth m p wrote: >> ...snip... >>> all: >>> obj-m += modname.o >>> modname-y := mydriver.o >> >> That's definitely not going to work. > > Perhaps that is my mistake indeed. As I said I create makefiles that > will work if you just run make inside the project folder by checking if > I am in the kernel build system or not. Basically I use this template: > > ifneq ($(KERNELRELEASE),) > obj-m := composite_driver.o > composite_driver-y := file1.o file2.o > > else > KERNELDIR ?= ~/Kernel/linux-2.6.35-rc6/ > PWD := $(shell pwd) > > default: > make -C $(KERNELDIR) M=$(PWD) modules > > clean: > make -C $(KERNELDIR) M=$(PWD) clean > > endif That looks reasonable, although the normal way of specifying multiple files in an object is like: obj-m := composite_driver.o composite_driver-objs := file1.o file2.o which is what you mentioned with the excerpt from the kbuild documenation. ...snip... > (did I get it right the second time around? ;-) Mostly. You used composite_driver-y rather then composite_driver-objs -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ