Results 1 to 1 of 1
Hello,
I had written a small HelloWorld module; I had prepared this simple
Makefile for it:
obj-m := HelloWorld.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) ...
- 06-18-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 1
How can I Build a module in a different folder
Hello,
I had written a small HelloWorld module; I had prepared this simple
Makefile for it:
obj-m := HelloWorld.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
I ran make, the ko file was created, and I could insmod the module.
I want to be able to run make and that the results (the *.o and
*.ko and all intermediate results) will be in a different folder,
named myFolder.
What should I do ?
I tried to run make make make O=myFolder (where myFolder is a directory
I created under where I am ) but I got errors.
How should this be done?
Moreover: can this be done by setting some option in the Makefile itself ?
Regards,
Ian


Reply With Quote
