__KERNEL__ and __MODULE__

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

 



Hi,

I find a lot of code buried within #ifdefs for the following variables:

MODULE / __MODULE__
KERNEL / __KERNEL__

1) AFAIK, the MODULE / __MODULE__ is defined when my drievr is
selected to be compiled as a module, and the KERNEL / __KERNEL__ is
defined when is is selected to be built in the kernel image. Is this
right?

2) Why two variants ? KERNEL V/s __KERNEL__ and MODULE v/s __MODULE__?

3) Do I need to define these symbols in my Makefile myself or the
Kernel Makefiles / Kbuild does it for me?

Thanks,

Dan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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