Re: What's the meaning of SUBDIRS ?

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

 



make needs to enter the linux source tree in order to read the
top-level Makefile from that directory.

SUBDIRS is a variable used by the kernel top-level Makefile to know
which directory it should build external modules after performing some
initial checks to ensure proper compilation.


Greetings,

Philipp

On Sat, Oct 1, 2011 at 11:53 AM, Parmenides <mobile.parmenides@xxxxxxxxx> wrote:
> Hi,
>
>    When making a kernel module outside the kernel source tree, I can
> use this command to make my kernel module:
>
>                                            make -C /usr/src/linux
> SUBDIRS=$PWD modules
>
> According to man, the -C option will chanage the current working
> directory to the top level directory of kernel source tree.
> Furthermore, the SUBDIRS varialbe contains the path of current working
> directory where my module is living. So, why does 'make' need to enter
> /usr/src/linux first? And, What's the role of 'SUBDIRS'? Thanks.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

_______________________________________________
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