Compiling Module with Multiple Files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to compile & link  file1.c and file2.c to make module named
"file_module.ko". The makefile I'm using is creating  file1.ko and
file_module.ko instead of creating only one module object "file_module.ko".
Please let me know if there is something wrong with my make file.

[file1.c contains module_init and module_exit. File2.c contains few
functions called by  file1.c ]


obj-m := file_module.o
fast_module-objs := file2.o file1.o

default:
        $(MAKE) -w -C /usr/src/linux-2.6.7-DSL SUBDIRS=`pwd` modules


Thanks/Sanjay



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux