Hello!
I would like to manage the source files in folders in the development of a kernel module.
I'm trying to run the makefile with this setup:
How can i build with this strucure? My makefile is actually (this run great in the same folder of the source file):
How i can build the module with the folder structure?
I tried with:
And
I think i have to setup some variable (?) Where i can check this?
It would be nice also if the myModule.ko was moved in the bin folder and the objects in obj folder.
Thank you
Best regards.
I would like to manage the source files in folders in the development of a kernel module.
I'm trying to run the makefile with this setup:
Code:
- Makefile
+ src
- mySrc.c
+ obj
+ bin
...
How can i build with this strucure? My makefile is actually (this run great in the same folder of the source file):
Code:
SRCS=mySrc.c
KMOD=myModule
.include <bsd.kmod.mk>
How i can build the module with the folder structure?
I tried with:
Code:
SRCS=src/mySrc.c
KMOD=myModule
.include <bsd.kmod.mk>
make
produces: error: unable to open output file 'src/mySrc.o': 'No such file or directory'
I think i have to setup some variable (?) Where i can check this?
It would be nice also if the myModule.ko was moved in the bin folder and the objects in obj folder.
Thank you
Best regards.