Re: how to include a header from an other module?

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

 



Hi,

Thanks for your mail.

> When the if statemenet results to TRUE (in most cases when you are compiling
> modules for the same kernel version you are running), the whole other part
> of the Makefile gets choped out. Why do you use KERNELRELEASE at all?

I think the `ifneq ($(KERNELRELEASE, )' condition is a norm of kernel
make file.  When make is invoked at first time, the variable
$(KERNELRELEASE) is not defined, so the target `modules' is made, by
executing make again.

The second make first changes to kernel directory, and then uses the
`Makefile' in the kernel directory.  The second `Makefile' loads the
first `Makefile' with the variable $(KERNELRELEASE) defined. Thus the
variable `obj-m' is evaluated and the `Makefile' in the kernel
directory knows which module to make.

Anyway, it works even if we don't use the condition, because the
variable `obj-m' is evaluated and passed on to the second make
command.


Regards,
Wenhua

--
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