Building a kernel module from several source files which one of them has the same name as the module

后端 未结 5 1873
[愿得一人]
[愿得一人] 2020-12-02 17:24

Is it possible to build a kernel module from several source files which one of them has the same name as the module?

For example: I want to build \"mymodule.ko\" wit

5条回答
  •  Happy的楠姐
    2020-12-02 17:47

    Proper way to fix in kernel make file would be as:

    # 
    obj-m+= my_module.o
    
    #append other source files except my_module.c which would be include by default
    my_module-objs+= src1.o src2.o
    

提交回复
热议问题