* building external library under 2.6
@ 2004-09-30 12:26 Frederic Dumoulin
2004-09-30 13:59 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Frederic Dumoulin @ 2004-09-30 12:26 UTC (permalink / raw)
To: linux-kernel
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
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
I've just the following output:
make -C /lib/modules/2.6.8.1/build M=xxx/testKernel modules
make[1]: Entering directory `/usr/src/linux-2.6.8.1'
Building modules, stage 2.
MODPOST
make[1]: Leaving directory `/usr/src/linux-2.6.8.1'
I've got neither .o nor .a files
What's wrong?
Fred
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: building external library under 2.6
2004-09-30 12:26 building external library under 2.6 Frederic Dumoulin
@ 2004-09-30 13:59 ` Sam Ravnborg
2004-09-30 15:04 ` Frederic Dumoulin
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2004-09-30 13:59 UTC (permalink / raw)
To: Frederic Dumoulin; +Cc: linux-kernel
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: building external library under 2.6
2004-09-30 13:59 ` Sam Ravnborg
@ 2004-09-30 15:04 ` Frederic Dumoulin
0 siblings, 0 replies; 3+ messages in thread
From: Frederic Dumoulin @ 2004-09-30 15:04 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
It doesn't change anything!
Sam Ravnborg wrote:
>>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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-09-30 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-30 12:26 building external library under 2.6 Frederic Dumoulin
2004-09-30 13:59 ` Sam Ravnborg
2004-09-30 15:04 ` Frederic Dumoulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox