Hi,
I succeeded to build an externel module under 2.6 with the following
Makefile:
ifneq ($(KERNELRELEASE),)
obj-m := testKernel.o
testKernel-objs := $(OBJS)
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
testKernel.ko :
$(MAKE) -C $(KDIR) M=$(PWD) modules
endif
Look ok except the way you use testKernel.ko.
Much better to use all: since this will not conflict
with a potential output file.
I made modifications in order to build a library:
ifneq ($(KERNELRELEASE),)
lib-y := $(OBJS)
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
lib.a :
$(MAKE) -C $(KDIR) M=$(PWD) modules
endif
Try wil all: as replacement for lib.a:
It should cure things.
No access to Linux box atm so I cannot check.
Sam