Building multi-file modules

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

 



Hi Folks,

I've got a module, call it foo, presently built from a single source
file, drivers/char/foo.c It's gotten enormous, so I want to split it.
Ideally I'd keep the original name for one of the source files. So
what I want is a module named foo, build from source files foo.c,
bar.c and baz.c

kbuild is being uncooperative. 

The following works:

obj-$(CONFIG_FOO) += foo_renamed.o
foo_renamed-objs := foo.o bar.o baz.o

I'd just prefer not to rename either the module or the original source
file. Is this supposed to be possible, and if so, how?

I'm on RHEL 6.1, aka kernel 2.6.32, in case that matters.  Also, in
case that matters, I'm building the module into the kerenl ("y" not
"m" in the config.) 


----what I've tried----
The following gives me warnings from make:

obj-$(CONFIG_FOO) += foo.o
foo-objs := foo.o bar.o baz.o


The following never compiles foo.c:

obj-$(CONFIG_FOO) += foo.o
foo-objs := bar.o baz.o


Thanks for any insight,

--
Arlie

(Arlie Stephens					arlie@xxxxxxxxxxxx)

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[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