|
|
Log in / Subscribe / Register

Multi-file modules--help!

Multi-file modules--help!

Posted Jul 23, 2004 19:04 UTC (Fri) by ajnicholson (guest, #23376)
Parent article: Driver porting: compiling external modules

I have an external module comprised of 3 .c files...

I made the following Makefile:
----------------------------------
obj-m := foo.o
module-objs := file1.c file2.c file3.c
-----------------------------------

yet when I compile it by running:
make -C /usr/src/linux SUBDIRS=$PWD modules

It issues the following error:
make[2]: *** No rule to make target '/usr/src/foo.c', needed by '/usr/src/foo/foo.o'. Stop.

Any ideas? I thought the "module-objs" line was supposed to indicate which files comprise the complete module...


to post comments

Multi-file modules--help!

Posted Jul 25, 2004 17:09 UTC (Sun) by amishdave (guest, #10005) [Link]

I think you need to replace module-objs with foo-objs...


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds