Kernel driver with 2 files - ko contains binary of one file only
by zvivered from LinuxQuestions.org on (#512BE)
Hello,
Attached Makefile and source code for a simple kernel device driver.
With this Makefile, if there a syntax error in file1.c, it's ignored.
file1.o, file2.o, file1.ko are created but it's a fake.
The nmoutput of file1.o is identical to that of file2.o
Can you please help understand what is wrong in my Makefile ?
Thank you,
Zvika
Attached Files


Attached Makefile and source code for a simple kernel device driver.
With this Makefile, if there a syntax error in file1.c, it's ignored.
file1.o, file2.o, file1.ko are created but it's a fake.
The nmoutput of file1.o is identical to that of file2.o
Can you please help understand what is wrong in my Makefile ?
Thank you,
Zvika
Attached Files
![]() | file1.txt (1.1 KB) |
![]() | file2.txt (891 Bytes) |
![]() | Makefile.txt (213 Bytes) |