Re: Makefile for module with multiple directories

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

 




On 3/6/07, Rick Brown <rick.brown.3@xxxxxxxxx> wrote:
Hi,

I want to compile a kernel module whose source is organized in a
directory hierarchy. For eg:

driver
   |---A
   |    |---1.c
   |    |---2.c
   |
   |---B
        |---3.c
        |--- 4.c

I want to compile a single module (.ko) out of these source files. Can
you please suggest me a Makefile?

Makefile
********
obj-m := module.o
module-objs :=  A/1.o A/2.o B/3.o B/4.o

do_make.sh
************
make -C /kernel_source_path M=<yours_module_directory_path> modules

give execute permission to do_make.sh. Then you can use ./do_make to make your module.

Thanks and Regards,
Prasad.

Thanks,

Rick

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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