On Friday 11 March 2005 08:23 pm, Sanjay wrote: > 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 > obj-m := file_module.o file_module-y := file2.o file1.o default: $(MAKE) -C /usr/src/linux-2.6.7-DSL M=`pwd` You may also want to read Documentation/kbuild/* tavi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/